title: Is there any way of imitating OR in Java Generics
body: <p>EDIT: I changed a bit the example for getting the idea:</p>
  
  <p>Like     </p>
  
  <pre><code> &lt;Integer or Float&gt;
  </code></pre>
  
  <p>...without having to create a common interface and make a subclass for Integer and Float to implement it</p>
  
  <p>If not, something like this would maybe have more sense and be useful</p>
  
  <pre><code> &lt;E extends Number&gt; &lt;E = (Integer|Float)&gt;
  </code></pre>
  
  <p>If ? is a wildcard why should not we allowed to restrict certain types?</p>