When I open the sourcecode of the TreeSet Class there is the following code:
public boolean contains(Object o) {
return m.containsKey(o);
}
m is a NavigableMap which is an interface. So where is the implementation? It is definitely not in TreeSet itself.