Why do contains()/indexOf() in a Java collections use o.equals(e) and not e.equals(o)?
- by Fernando
Why are the methods contains() and indexOf() in the Java collections framework defined using o.equals(e) and not e.equals(o) (where o is the argument of the methods and e is the element in the collection)?
Anyone know the reasons of that?