title: java.util.Set add and remove method signature difference
body: <p>When I see the Set.java file in JDK,</p>
  
  <pre><code>/**
   *
   * &lt;p&gt;This interface is a member of the
   * &lt;a href="{@docRoot}/../technotes/guides/collections/index.html"&gt;
   * Java Collections Framework&lt;/a&gt;.
   *
   * @param &lt;E&gt; the type of elements maintained by this set
   *
   * @author  Josh Bloch
   * @author  Neal Gafter
   * @see Collection
   * @see List
   * @see SortedSet
   * @see HashSet
   * @see TreeSet
   * @see AbstractSet
   * @see Collections#singleton(java.lang.Object)
   * @see Collections#EMPTY_SET
   * @since 1.2
   */
  public interface Set&lt;E&gt; extends Collection&lt;E&gt; {
      /**
       * @param e element to be added to this set
       * @return &lt;tt&gt;true&lt;/tt&gt; if this set did not already contain the specified
       *         element
       * @throws UnsupportedOperationException if the &lt;tt&gt;add&lt;/tt&gt; operation
       *         is not supported by this set
       * @throws ClassCastException if the class of the specified element
       *         prevents it from being added to this set
       * @throws NullPointerException if the specified element is null and this
       *         set does not permit null elements
       * @throws IllegalArgumentException if some property of the specified element
       *         prevents it from being added to this set
       */
      boolean add(E e);
  
       /**
       * @param o object to be removed from this set, if present
       * @return &lt;tt&gt;true&lt;/tt&gt; if this set contained the specified element
       * @throws ClassCastException if the type of the specified element
       *         is incompatible with this set
       * (&lt;a href="Collection.html#optional-restrictions"&gt;optional&lt;/a&gt;)
       * @throws NullPointerException if the specified element is null and this
       *         set does not permit null elements
       * (&lt;a href="Collection.html#optional-restrictions"&gt;optional&lt;/a&gt;)
       * @throws UnsupportedOperationException if the &lt;tt&gt;remove&lt;/tt&gt; operation
       *         is not supported by this set
       */
      boolean remove(Object o);
  
      //other methods
  }
  </code></pre>
  
  <p>I am not getting, why <code>add</code> method is taking <strong><code>E</code></strong> parameter and <code>remove</code> method is taking <strong><code>Object</code></strong> parameter as a input argument? </p>
  
  <p>Any help or reference link to understand this behavior would be appreciate. </p>