Where has the map method on Optional moved?

Mike Duigou mike.duigou at oracle.com
Tue Feb 26 08:56:00 PST 2013

On Feb 26 2013, at 05:02 , Tim Peierls wrote:

> On Tue, Feb 26, 2013 at 7:49 AM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
>> Keep Optional, and keep it lean and mean. (At least as lean as the Guava Optional.)
> I notice Guava's Optional has a transform method:
> Right -- "at least as lean". But leaner is better. I haven't used the transform method. It feels like the top of the slippery slope that leads to monstrosities like Map<String, Optional<Integer>>.
>> One of the reasons Doug Lea is not an Optional fan is fear of things like Collection<Optional<T>>, something that is less likely to happen with a minimalist Optional.
> Especially so if we make it more difficult by removing the hashcode and equals methods.
> Yes! With docs explaining why.

I am working on this now. The methods won't be removed but will support only the identity hashCode()/equals().

> --tim

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