Map.getOrDefault(Object,Supplier<V>) override

Michael Nascimento misterm at gmail.com
Thu Apr 18 14:32:10 PDT 2013


Hi guys,

Sometimes constructing the default object is too costly and relying on
the ternary operation is the escape hatch again. A
Map.getOrDefault(Object,Supplier<V>) would solve this.

Has this been considered before?

Regards,
Michael


More information about the lambda-dev mailing list