- absent
Returns an absent Optional instance. No value is present for this Optional.
- isPresent
Return true if there is a value present, otherwise false.
- of
Returns an Optional with the specified present non-null value.
- get
If a value is present in this Optional, returns the value, otherwise throws
IllegalStateException.
- ifPresent
If a value is present, invoke the specified consumer with the value, otherwise
do nothing.
- ifPresentOrElse
If a value is present, invoke the specified consumer with the value, otherwise
invoke the function p
- ofNullable
Returns an Optional describing the specified value, if non-null, otherwise
returns an absent Optiona
- or
Return the value if present, otherwise return other.
- orNull
Return the contained value, if present, otherwise null.
- orThrow
Return the contained value, if present, otherwise throw an exception instance
provided as the parame