title: The method in the type is not applicable for the arguments
body: <p>im trying to make a card game, but i'm having some small problems with it.  I am trying to add a Card currentCard from another classin my new list cards. and i get the error The method addLast(Card) in the type SingleLinkedList is not applicable for the arguments (DoubleLinkedList.Element).  </p>
  
  <pre><code>public class CardList&lt;E extends Comparable&lt;? super E&gt;&gt; extends SingleLinkedList&lt;E&gt; {
  
  private SingleLinkedList&lt;Card&gt; cards;
  
  private int cardRow;                
  
  public CardList(int cardRow) {
  
      this.cardRow = cardRow;
      cards = new SingleLinkedList&lt;Card&gt;();
  
          cards.addLast(CardDeck.currentCard);   // here is the error
      }
  }
  </code></pre>
  
  <p>My addLast method in SingleLinkedList:</p>
  
  <pre><code>public class SingleLinkedList&lt;E&gt; {
  
  protected transient Element&lt;E&gt; head;
  protected transient int size;
  
  public SingleLinkedList() {
      head = null;
      size = 0;
  }
  
  public void addLast(E value) {
      Element&lt;E&gt; temp = new Element&lt;E&gt;(value, null);
      if (head != null) {
          Element&lt;E&gt; finger = head;
          while(finger.next != null) {
              finger = finger.next;
          }
          finger.next = temp;
      } else {
          head = temp;
      }
      size++;
  }
  </code></pre>
  
  <p>an the element class (inside the singlelinkedlist class)</p>
  
  <pre><code>protected static class Element&lt;E&gt; {
  
      public E value;
      public Element&lt;E&gt; next;
  
      public Element(E value, Element&lt;E&gt; next) {
          this.value = value;
          this.next = next;
      }
  }
  </code></pre>
  
  <p>and the currentCard variable from the class DoubleLinkedList</p>
  
  <pre><code> public class CardDeck&lt;E extends Comparable&lt;? super E&gt;&gt; extends DoubleLinkedList&lt;E&gt; {
  
  
  private DoubleLinkedList&lt;Card&gt; cards;
  static Element&lt;Card&gt; currentCard;
  </code></pre>
  
  <p>I know the problem is that i am trying to insert a element  into a method that expect to get a Card, but i just cant figure out how to convert it from generics to a specific type (card) or something.   I have been looking for some good tutorial about generics but haven't found something that helps me directly yet. So if someone either has some tips about solving my problem directly, or have a good link to a tutorial/description on the subject i would be very thankful!</p>
  
  <p>If you need more info, or i need to rephrase something please tell me :)</p>