Package org.wildfly.clustering.function
Interface BooleanSupplier
- All Superinterfaces:
BooleanSupplier
An enhanced boolean supplier.
- Author:
- Paul Ferraro
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault BooleanSupplierhandle(Predicate<RuntimeException> handler) Returns a new supplier that delegates to this supplier using the specified exception handler.static BooleanSupplierof(boolean value) Returns a supplier that always returns the specified value.static <T,U> BooleanSupplier of(BiPredicate<T, U> predicate, Supplier<T> formerSupplier, Supplier<U> latterSupplier) Returns a boolean supplier that evaluates a predicate against a supplied value.static <T> BooleanSupplierReturns a boolean supplier that evaluates a predicate against a supplied value.Methods inherited from interface java.util.function.BooleanSupplier
getAsBoolean
-
Field Details
-
TRUE
-
FALSE
-
-
Method Details
-
handle
Returns a new supplier that delegates to this supplier using the specified exception handler.- Parameters:
handler- an exception handler- Returns:
- a new supplier that delegates to this supplier using the specified exception handler.
-
of
Returns a supplier that always returns the specified value.- Parameters:
value- the supplied value- Returns:
- a supplier that always returns the specified value.
-
of
Returns a boolean supplier that evaluates a predicate against a supplied value.- Parameters:
predicate- a predicate use to evaluate the supplied valuesupplier- a supplier of the value to test- Returns:
- a boolean supplier that evaluates a predicate against a supplied value.
-
of
static <T,U> BooleanSupplier of(BiPredicate<T, U> predicate, Supplier<T> formerSupplier, Supplier<U> latterSupplier) Returns a boolean supplier that evaluates a predicate against a supplied value.- Parameters:
predicate- a predicate used to evaluate the supplied valuesformerSupplier- a supplier of the former value to testlatterSupplier- a supplier of the latter value to test- Returns:
- a boolean supplier that evaluates a predicate against a supplied value.
-