Returns the value if present, else throwing an error.
Map the value by f if present, else returning an empty Optional.
Returns the value if present, else returning other.
Returns an empty (not present) Optional.
Internally, all empty Optionals are the same literal object.
Returns a new present Optional representing value.
Generated using TypeDoc
An optional value of type T.
Construct using Optional.of or Optional.empty.
Collabs uses this utility type in places where
T | undefined
orT | null
is inappropriate because T may itself be null/undefined.Local data structure - not a Collab.