Package org.apache.juneau.internal
Class ConsumerUtils
java.lang.Object
org.apache.juneau.internal.ConsumerUtils
Utilities when working with 
Predicates and Consumers.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> voidConsumes the specified value if it's the specified type and the predicate isnull or matches the specified value.static <T> voidConsumes the specified value if the predicate isnull or matches the specified value.static <T> booleanReturnstrue if the specified object is the specified type and the specified predicate isnull or matches the specified value.static <T> booleanReturnstrue if the specified predicate isnull or matches the specified value.
- 
Constructor Details- 
ConsumerUtilspublic ConsumerUtils()
 
- 
- 
Method Details- 
testReturnstrue if the specified predicate isnull or matches the specified value.- Type Parameters:
- T- The type being tested.
- Parameters:
- predicate- The predicate.
- value- The value to test.
- Returns:
- true if the specified predicate is- null or matches the specified value.
 
- 
testReturnstrue if the specified object is the specified type and the specified predicate isnull or matches the specified value.- Type Parameters:
- T- The type being tested.
- Parameters:
- type- The expected type.
- predicate- The predicate.
- value- The value.
- Returns:
- true if the specified predicate is- null or matches the specified value.
 
- 
consumeConsumes the specified value if the predicate isnull or matches the specified value.- Type Parameters:
- T- The type being consumed.
- Parameters:
- predicate- The predicate.
- consumer- The consumer.
- value- The value.
 
- 
consumepublic static <T> void consume(Class<T> type, Predicate<T> predicate, Consumer<T> consumer, Object value) Consumes the specified value if it's the specified type and the predicate isnull or matches the specified value.- Type Parameters:
- T- The type being consumed.
- Parameters:
- type- The expected type.
- predicate- The predicate.
- consumer- The consumer.
- value- The value.
 
 
-