RFR : JDK-8001642 : Add Optional, OptionalDouble, OptionalInt, OptionalLong (original) (raw)
Mike Duigou mike.duigou at oracle.com
Mon Mar 4 20:29:41 UTC 2013
- Previous message: RFR: 8006593: Performance and compatibility improvements to hash based Map implementations
- Next message: RFR : JDK-8001642 : Add Optional, OptionalDouble, OptionalInt, OptionalLong
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello All;
This patch introduces Optional container objects to be used by the lambda streams libraries for returning results.
The reference Optional type, as defined, intentionally does not allow null values. null may be used with the Optional.orElse() method.
All of the Optional types define hashCode() and equals implementations. Use of Optional types in collections should be generally discouraged but having useful equals() and hashCode() is ever so convenient.
http://cr.openjdk.java.net/~mduigou/JDK-8001642/0/webrev/
Mike
- Previous message: RFR: 8006593: Performance and compatibility improvements to hash based Map implementations
- Next message: RFR : JDK-8001642 : Add Optional, OptionalDouble, OptionalInt, OptionalLong
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]