title: Union method for LinkedSet
body: <p>I am trying to get the union of two LinkedSets of type T and do so as efficiently as I could. My approach was to make a new set (uSet) and addAll to that set for one LinkedSet and the other I would just use my add method as it shouldn't add any duplicates. However I am getting a &quot;cannot find symbol&quot; error while trying to use addAll. Here is what I have in the method at the moment.</p>
  <pre><code>   public Set&lt;T&gt; union(LinkedSet&lt;T&gt; s){
    
    if (s == null) {
       throw new NullPointerException();
    }
   
    LinkedSet&lt;T&gt; uSet = new LinkedSet&lt;T&gt;();
    uSet.addAll(s);
   
   
    
    return uSet; 
  </code></pre>
  <p>}</p>
  <p>I've been doing some googling and am way lost and feel like I'm in over my head here trying to understand what I'm doing so any guidance would be greatly appreciated.</p>