Interface Supplier<T>
- Type Parameters:
T- the supplied type
- All Superinterfaces:
Supplier<T>
- All Known Subinterfaces:
BlockingReference.Writer<T>, ContextualBatch, IdentifierFactoryService<I>
- All Known Implementing Classes:
AbstractContextualBatch, AffinityIdentifierFactoryService, BlockingReference.ConditionalReferenceWriter, BlockingReference.ReferenceWriter, DefaultTransactionalBatch, SimpleContextualBatch, SimpleContextualBatchFactory, SimpleIdentifierFactoryService, ThreadContextBatchFactory, TransactionalBatchFactory
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Supplier<T> Returns a supplier that delegates to the specified caller using the specified exception handler.static <T> Supplier<T> empty()Returns a supplier that always returns the specified value.Returns a supplier of aMap.Entryfrom the specified key and value suppliers.handle(Function<RuntimeException, T> handler) Returns a new supplier that delegates to this supplier using the specified exception handler.static <T> Supplier<T> of(T value) Returns a supplier that always returns the specified value.static <T> Supplier<T> Returns a supplier that returns null after invoking the specified task.default RunnerthenAccept(Consumer<T> consumer) Returns aRunnablethat consumes the supplied value.default <R> Supplier<R> Returns a supplier that returns the value this supplier mapped via the specified function.default DoubleSupplierthenApplyAsDouble(ToDoubleFunction<T> mapper) Returns a supplier that returns the value this supplier mapped via the specified function.default IntSupplierthenApplyAsInt(ToIntFunction<T> mapper) Returns a supplier that returns the value this supplier mapped via the specified function.default LongSupplierthenApplyAsLong(ToLongFunction<T> mapper) Returns a supplier that returns the value this supplier mapped via the specified function.default BooleanSupplierReturns a supplier that returns the value this supplier mapped via the specified predicate.
-
Field Details
-
NULL
A supplier that always returns null
-
-
Method Details
-
thenAccept
-
thenApply
Returns a supplier that returns the value this supplier mapped via the specified function.- Type Parameters:
R- the mapped value type- Parameters:
function- a mapping function- Returns:
- a supplier that returns the value this supplier mapped via the specified function.
-
thenApplyAsDouble
Returns a supplier that returns the value this supplier mapped via the specified function.- Parameters:
mapper- a mapping function- Returns:
- a supplier that returns the value this supplier mapped via the specified function.
-
thenApplyAsInt
Returns a supplier that returns the value this supplier mapped via the specified function.- Parameters:
mapper- a mapping function- Returns:
- a supplier that returns the value this supplier mapped via the specified function.
-
thenApplyAsLong
Returns a supplier that returns the value this supplier mapped via the specified function.- Parameters:
mapper- a mapping function- Returns:
- a supplier that returns the value this supplier mapped via the specified function.
-
thenTest
Returns a supplier that returns the value this supplier mapped via the specified predicate.- Parameters:
predicate- a mapping predicate- Returns:
- a supplier that returns the value this supplier mapped via the specified predicate.
-
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.
-
empty
Returns a supplier that always returns the specified value.- Type Parameters:
T- the supplied type- Returns:
- a supplier that always returns the specified value.
-
of
Returns a supplier that always returns the specified value.- Type Parameters:
T- the supplied type- Parameters:
value- the supplied value- Returns:
- a supplier that always returns the specified value.
-
run
-
call
Returns a supplier that delegates to the specified caller using the specified exception handler.- Type Parameters:
T- the supplied type- Parameters:
caller- the caller to callhandler- an exception handler- Returns:
- a supplier that delegates to the specified caller using the specified exception handler.
-
entry
-