- get
Returns the contained instance, which must be present. If the instance might be
absent, use #or(Obje
- isPresent
Returns true if this holder contains a (non-null) instance.
- absent
Returns an Optional instance with no contained reference.
- of
Returns an Optional instance containing the given non-null reference.
- fromNullable
If nullableReference is non-null, returns an Optional instance containing that
reference; otherwise
- orNull
Returns the contained instance if it is present; null otherwise. If the instance
is known to be pres
- or
Returns the contained instance if it is present; defaultValue otherwise. If no
default value should
- transform
If the instance is present, it is transformed with the given Function;
otherwise, Optional#absent is
- equals
Returns true if object is an Optional instance, and either the contained
references are Object#equal
- hashCode
Returns a hash code for this instance.
- asSet
Returns an immutable singleton Set whose only element is the contained instance
if it is present; an
- presentInstances
Returns the value of each present instance from the supplied optionals, in
order, skipping over occu