It could still be added in a future rev. setValue was less compelling and 
obviously correct than Iterator.remove(). I had a version of Map.Entry earlier 
on which provided provided setValue() along defaults for the required 
implementations of hashCode() and equals(). The spec for these later two 
methods is part of the API so defaults seemed appropriate. We essentially 
didn't implement them to avoid scope creep--none of these were strictly 
necessary for our other goals. For Iterator.remove() we could get immediate 
benefit.

Mike

On Nov 20 2013, at 14:54 , Remi Forax <[email protected]> wrote:

> A good question of one of my student,
> why Iterator.remove() is a default method that throws UOE in 8 but 
> Map.Entry.setValue() is not a default method with the same semantics.
> 
> regards,
> Rémi
> 

Reply via email to