On 04/03/2013 20:29, Mike Duigou wrote:
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
Just a couple of small things.
Will the docs build complain about the unknown taglets? (@apiNote,
@implNote ...)
Optional.of(T) has two @param tags.
In orElseGet currently reads "Supplier who's result is returned ..." but
I assume you want the possessive, hence "whose".
Are you planning to include a test? I realize this will get a good
workout once the streams work come in.
-Alan.