Type of the stored value.
Optional containing the original value or empty. Based on original existence and passing filter.
The new value's type.
A new Optional containing the transformed value or empty.
If a value is present in this Optional, returns the value, otherwise throws Error.
The stored value.
If a value is present, invoke the specified consumer with the value, otherwise do nothing.
Returns if the Optional contains a value.
true
if there is a value present, otherwise false
.
If a value is present, apply the provided mapping function to it, and if the result is non-null, return an Optional describing the result.
The new value's type.
A new Optional containing the transformed value or empty.
Return the value if present, otherwise return other.
Value to be returned if Optional does not contain a value.
Either the Optional's value or, if it doesn't exist, the provided value.
Return the value if present, otherwise invoke other
and return the result of that invocation.
Either the Optional's value or, if it doesn't exist, the value from the provided method.
Return the contained value, if present, otherwise throw an error to be created by the provided supplier.
Method provides an error that will be throw if the Optional doesn't contain a value.
The Optional's value.
Returns an Optional that is empty.
Returns an Optional with the given value.
Stored value.
Implementation of the Java 8+ Optional class . Documentation mostly copied from Javadoc