I'm trying to creating a Queue class, but keep getting an error seemingly to do with generics. Why am I getting this error?
<p>I have a LinkedList class, which serves as the base for a Queue class, which serves as the base for a PrintQueue class.</p>

<p>Here's my PrintQueue class:</p>

<pre><code>public class PrintQueue&lt;T&gt; {
    private Queue&lt;T&gt; queue;

    public PrintQueue() {
        queue = new Queue&lt;T&gt;();
    }

    public void lpr(String owner, int jobID) {
        queue.enqueue(new Job(owner, jobID));
    }
}
</code></pre>

<p>The <code>queue.enqueue(...)</code> line, three from the bottom is resulting in an error:</p>

<blockquote>
  <p>The method enqueue(T) in the type Queue is not applicable for the arguments (Job)</p>
</blockquote>

<p>PrintQueue is a queue of Job objects.</p>

<p>The enqueue method in my Queue class looks like this:</p>

<pre><code>    public void enqueue(T item) {
        queue.addToEnd(item);
    }
</code></pre>

<p>And the addToEnd method looks like this:</p>

<pre><code>public void addToEnd(T item) {
    Node&lt;T&gt; itemnode = new Node&lt;T&gt;(item, null); 

    if (isEmpty()) {
        head = itemnode;
    }
    else {
        Node&lt;T&gt; curr = head;

        while (curr.getNext()!=null) {
            curr= curr.getNext();
        }

        curr.setNext(itemnode);
    }

    count++;

}
</code></pre>

<p>Why isn't this working? All three classes (PrintQueue, Queue and LinkedList) are generic classes .</p>
