Uses of Interface
org.microbean.invoke.OptionalSupplier
-
Uses of OptionalSupplier in org.microbean.invoke
Modifier and TypeClassDescriptionfinal class
Absence<T>
AnOptionalSupplier
implementation that indicates permanent absence.final class
AnOptionalSupplier
that computes the value it will return from itsCachingSupplier.get()
method when that method is first invoked, and that returns that computed value for all subsequent invocations of that method.final class
AnOptionalSupplier
implementation that supplies a fixed value.Modifier and TypeMethodDescriptionstatic <T> OptionalSupplier<T>
OptionalSupplier.of()
InvokesAbsence.instance()
and returns the result.static <T> OptionalSupplier<T>
Returns anOptionalSupplier
representing the suppliedSupplier
.static <T> OptionalSupplier<T>
Returns anOptionalSupplier
that will, loosely speaking, try the suppliedsupplier
first, and, if it throws aNoSuchElementException
or anUnsupportedOperationException
from itsSupplier.get()
method, will then try the supplieddefaults
.static <T> OptionalSupplier<T>
OptionalSupplier.of
(OptionalSupplier.Determinism determinism, Supplier<? extends T> supplier) Returns a newOptionalSupplier
whosedeterminism()
method will return the suppliedOptionalSupplier.Determinism
and whoseget()
method will return the result of invoking theSupplier.get()
method on the suppliedsupplier
.static <T> OptionalSupplier<T>
OptionalSupplier.of
(T value) Returns a newOptionalSupplier
whosedeterminism()
method will returnOptionalSupplier.Determinism.PRESENT
and whoseget()
method will return the suppliedvalue
.