Interface BooleanSupplier
- All Superinterfaces:
BooleanSupplier
An enhanced boolean supplier.
- Author:
- Paul Ferraro
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BooleanSupplierA supplier that always returns falsestatic final BooleanSupplierA supplier that always returns true -
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 BooleanSuppliernegate()Returns a supplier that return this negation of this supplier.static BooleanSupplierof(boolean value) Returns a supplier that always returns the specified value.Methods inherited from interface BooleanSupplier
getAsBoolean
-
Field Details
-
TRUE
A supplier that always returns true -
FALSE
A supplier that always returns false
-
-
Method Details
-
negate
Returns a supplier that return this negation of this supplier.- Returns:
- a supplier that return this negation of this supplier.
-
boxed
-
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.
-