title: Why ConcurrentSkipListSet.contains requires comparator and not equals
body: <p>I am using ConcurrentSkipListSet and using contains method. </p>
  
  <p>As per JAVA doc for contains method</p>
  
  <p>Returns true if this set contains the specified element. More formally, returns true if and only if this set contains an element e such that o.equals(e).</p>
  
  <p>But as per my test , it appears that equals method is not used but rather Comparator is mandatory. Please help me understand this anomaly between JAVA spec and implementation </p>
  
  <p>ConcurrentSkipListSet</p>
  
  <p>/**
       * If using comparator, return a ComparableUsingComparator, <strong>else
       * cast key as Comparable, which may cause ClassCastException,</strong>
       * which is propagated back to caller.
       */
      private Comparable comparable(Object key)</p>
  
  <p>at java.util.concurrent.ConcurrentSkipListMap.comparable(ConcurrentSkipListMap.java:663)
      at java.util.concurrent.ConcurrentSkipListMap.doGet(ConcurrentSkipListMap.java:821)
      at java.util.concurrent.ConcurrentSkipListMap.containsKey(ConcurrentSkipListMap.java:1608)</p>
  
  <p>I am using Oracle JDK 7</p>