- Type Parameters:
T- type of the mutable optional object
- All Known Implementing Classes:
Optionally.Empty,Optionally.Hard,Optionally.Soft
public interface Optionally<T>
Interface representing a reference to a potentially mutable optional object.
- Since:
- 6.7
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA permanently empty Optionallystatic classA permanent(hard) reference to an objectstatic classA SoftReference Optionally -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear the objectstatic <T> Optionally<T>empty()Get empty OptionallyGet an Optional representing the current state of the object
-
Field Details
-
EMPTY
The empty Optionally
-
-
Method Details
-
empty
Get empty Optionally- Type Parameters:
T- type of the empty Optionally- Returns:
- the empty Optionally
-
clear
void clear()Clear the object -
getOptional
Get an Optional representing the current state of the object- Returns:
- the mutable optional object
-