Comment by [email protected]:

The containsKey(), get(), and remove() methods for Map and MutableMap should take type Object and not K (same as the Java Map interface). The reason is that it is possible for objects of different classes to be .equals() (e.g. all implementations of java.util.List are equal if their contents are equal, regardless of class), so the object that one passes to containsKey(), get(), or remove(), need not be the same type as the type of the keys inside the map.

I see that you have already adopted Object for your Set's contains() method. So it would make sense to do it for Maps too.

For the same reason, the argument to Set and MutableSet's containsAll(), containsSome(), isEqual(), keepAll(), and removeAll() should be changed from `Set<E>` to `Set<?>`, because they only check elements for equality, and for that it doesn't matter the class.

For more information:
https://code.google.com/p/google-web-toolkit/wiki/LightweightCollections

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to