title: Use generic interface for class cast without warning
body: <p>Let's assume we we want describe a <code>Category</code> with a <code>Description</code> and a list of <code>Items</code>. Each <code>Item</code> also has one <code>Category</code>:</p>
  
  <pre><code>public interface Description
  {
  }
  </code></pre>
  
  <p>This interface is really simple. Describing <code>Category</code> with generic bounds
  becomes more complicated, but it's no rocket engineering.</p>
  
  <pre><code>interface Category&lt;D extends Description,
                     C extends Category&lt;D,C,I&gt;,
                     I extends Item&lt;D,C,I&gt;&gt;
  {
    public List&lt;I&gt; getItems();
    public void setItems(List&lt;I&gt; items);
  
    public D getDescription();
    public void setDescription(D description);
  }
  
  interface Item&lt;D extends Description,
                 C extends Category&lt;D,C,I&gt;,
                 I extends Item&lt;D,C,I&gt;&gt;
  {
    public C getCategory();
    public void setCategory(C category);
  }
  </code></pre>
  
  <p>Now I want to define an Interface to class-cast an object
  (<code>SecretDescription</code> is an implementation of <code>Description</code>):</p>
  
  <pre><code>SecretDescription sd = new SecretDescription();
  Description d = (SecretDescription)sd;
  </code></pre>
  
  <p>This of course works, but now the question:
  How can I use <code>Category</code> without a warning?</p>
  
  <pre><code>Category c;
  </code></pre>
  
  <p>This gives me the warning:</p>
  
  <pre><code>Category is a raw type. References to generic type Category&lt;D,C,I&gt;
  should be parameterized
  </code></pre>
  
  <p>Ok, but how can I parameterize this?</p>
  
  <pre><code>Category&lt;Description,Category,Item&gt; c;
  </code></pre>
  
  <p>This gives me the compiler error:</p>
  
  <pre><code>Bound mismatch: The type Category is not a valid substitute for the
  bounded parameter &lt;C extends Category&lt;D,C,I&gt;&gt; of the type Category&lt;D,C,I&gt;
  </code></pre>