Why isn\'t Collection.remove(Object o) generic?
Seems like Collection
could have boolean remove(E o);
Then, when you ac
I always figured this was because remove() has no reason to care what type of object you give it. It's easy enough, regardless, to check if that object is one of the ones the Collection contains, since it can call equals() on anything. It's necessary to check type on add() to ensure that it only contains objects of that type.