Package org.dmfs.jems2.optional
Class Absent<T>
java.lang.Object
org.dmfs.jems2.optional.Absent<T>
- All Implemented Interfaces:
Optional<T>
An
Optional value that's never present.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Absent
public Absent()
-
-
Method Details
-
absent
Returns anAbsentvalue.- Type Parameters:
T- The type of the absent value.- Returns:
- An
Absentof the given type.
-
isPresent
public boolean isPresent()Description copied from interface:OptionalReturns whether the optional value is present. -
value
Description copied from interface:OptionalReturns the optional value.- Specified by:
valuein interfaceOptional<T>- Throws:
NoSuchElementException- if the optional value is not present.
-