title: java generics with inheritance and interfacec
body: <p>I have already created a class called priority queue.</p>
  <pre><code>public class PriorityQueue&lt;T&gt; implements Iterable&lt;T&gt;
  </code></pre>
  <p>And now, I want to create a class <code>SpecialPriorityQueue&lt;T&gt;</code> with these details.</p>
  <ol>
  <li>While T in PriorityQueue can be any type, T in SpecialPriorityQueue has to implement an interface.</li>
  <li>SpecialPriorityQueue inherits from PriorityQueue, and it override some methods and uses some protected field of the PriorityQueue.</li>
  </ol>
  <p>Is there any clean way to do this without changing the code of PriorityQueue?</p>