- Type Parameters:
E
- Element type
- All Implemented Interfaces:
Consumer<E>
, Supplier<E>
Supplier that awaits a value and allows the value to be set, once,
to a not-null value. The value supplied by
get()
is never null.
Not thread-safe.
-
Constructor Summary
Constructors
-
Method Summary
void
Creates a MonotonicSupplier.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MonotonicSupplier
public MonotonicSupplier()
-
Method Details
-
empty
Creates a MonotonicSupplier.
-
accept
Sets the value once and for all.
- Specified by:
accept
in interface Consumer<E>
-