Map.asFunction

Doug Lea dl at cs.oswego.edu
Fri Jan 4 10:21:53 PST 2013


On 01/04/13 12:17, Remi Forax wrote:

>>>    default Function<K,V> asFunction() { return { k -> get(k) }; }
>>>
>>> Did we decide not to do this or just forget to do it?
>>>
> Not sure it worth a method as it can be written map::get or set::contains.
>

Good point. Assuming that matching and overload resolution become
a little more deterministic soon :-), there's no reason to encourage
people to use an explicit method for these purposes.

-Doug



More information about the lambda-libs-spec-experts mailing list