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.ABSENTwhen invoked.final Tget()Throws aNoSuchElementExceptionwhen 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, waitMethods inherited from interface org.microbean.invoke.OptionalSupplier
exceptionally, handle, ifPresent, ifPresentOrElse, optional, optional, optional, orElse, orElseGet, orElseThrow, orElseThrow, stream
-
Method Details
-
determinism
ReturnsOptionalSupplier.Determinism.ABSENTwhen invoked.- Specified by:
determinismin interfaceOptionalSupplier<T>- Returns:
OptionalSupplier.Determinism.ABSENTwhen 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 aNoSuchElementExceptionwhen invoked.- Specified by:
getin interfaceOptionalSupplier<T>- Specified by:
getin 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 returnedAbsencewill 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.
-