Note on java.util.functions

Neal Gafter neal at gafter.com
Wed May 23 08:55:28 PDT 2012


On Tue, May 22, 2012 at 11:45 AM, Brian Goetz <brian.goetz at oracle.com>wrote:

> Yes, naming is still up in the air.  First nailing down semantics...


Are you planning to synchronize the naming with the work of jsr341, which
calls this method singleOrDefault()?

2.3.32 singleOrDefault Operator
The singleOrDefault operator returns the single element of a collection, or
a default value of null if no element is found.
2.3.32.1 Syntax
S Iterable<S>.singleOrDefault()
S Iterable<S>.singleOrDefaultOrDefault((S->boolean) predicate)


More information about the lambda-dev mailing list