java.lang.Object
org.microbean.invoke.Absence<T>
- All Implemented Interfaces:
Supplier<T>
,OptionalSupplier<T>
An
OptionalSupplier
implementation that indicates permanent
absence.- Author:
- Laird Nelson
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.microbean.invoke.OptionalSupplier
OptionalSupplier.Determinism
-
Method Summary
Modifier and TypeMethodDescriptionReturnsOptionalSupplier.Determinism.ABSENT
when invoked.final T
get()
Throws aNoSuchElementException
when invoked.static final <T> Absence<T>
instance()
Returns the sole instance of this class.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.microbean.invoke.OptionalSupplier
exceptionally, handle, ifPresent, ifPresentOrElse, optional, optional, optional, orElse, orElseGet, orElseThrow, orElseThrow, stream
-
Method Details
-
determinism
ReturnsOptionalSupplier.Determinism.ABSENT
when invoked.- Specified by:
determinism
in interfaceOptionalSupplier<T>
- Returns:
OptionalSupplier.Determinism.ABSENT
when invoked- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
get
Throws aNoSuchElementException
when invoked.- Specified by:
get
in interfaceOptionalSupplier<T>
- Specified by:
get
in interfaceSupplier<T>
- Returns:
- nothing
- Throws:
NoSuchElementException
- when invoked- See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
instance
Returns the sole instance of this class.- Type Parameters:
T
- the type of the nonexistent value the returnedAbsence
will never supply- Returns:
- the sole instance of this class
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-