-
Sub-task
-
Resolution: Fixed
-
P3
-
None
-
b84
-
Verified
Optional<T> acts as a container for zero or one non-null values of type T. For methods which may return a value or not (e.g., stream.findFirst()), returning an Optional<T> is more explicit and type-safe. Optional has methods like get() (throws if the value is not present), orElse(T alternate), orElseThrow(Factory<Throwable>), etc.
- relates to
-
JDK-8010690 OptionalDouble.empty().hashCode() doesn't return zero
-
- Closed
-