Package org.wildfly.clustering.function
Interface BooleanSupplier
- All Superinterfaces:
BooleanSupplier
An enhanced boolean supplier.
- Author:
- Paul Ferraro
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboxed()Returns a boxed version of this supplier.default BooleanSupplierhandle(Predicate<RuntimeException> handler) Returns a new supplier that delegates to this supplier using the specified exception handler.default <V> Supplier<V> Returns an if/else supplier that delegates to the first specified supplier when this supplier evaluates to true, or the second specified supplier when this supplier evaluates to false.static BooleanSupplierof(boolean value) Returns a supplier that always returns the specified value.Methods inherited from interface java.util.function.BooleanSupplier
getAsBoolean
-
Field Details
-
TRUE
-
FALSE
-
-
Method Details
-
map
Returns an if/else supplier that delegates to the first specified supplier when this supplier evaluates to true, or the second specified supplier when this supplier evaluates to false.- Type Parameters:
V- the mapped value type- Parameters:
whenTrue- the mapped supplier when evaluating to truewhenFalse- the mapped supplier when evaluating to false- Returns:
- an if/else supplier that delegates to the first specified supplier when this supplier evaluates to true, or the second specified supplier when this supplier evaluates to false.
-
boxed
Returns a boxed version of this supplier.- Returns:
- a boxed version of this supplier.
-
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.
-