title: Java method that takes only objects that inherit from super class
body: <p>I would like to have a method in a Java class that will allow me to pass only objects that inherit from super class, f.e.:</p>
  
  <p>I have container super class <code>Div</code>:</p>
  
  <pre><code>package org.gwtbootstrap3.client.ui.html;
      public class Div extends ComplexWidget {
          public Div() {
              setElement(Document.get().createDivElement());
          }
      }
  </code></pre>
  
  <p>I would like to use <code>Div</code> class and its children in the <code>NRowsXNColumns</code> class:</p>
  
  <pre><code>public class NRowsXNColumns extends GenericLayout {
      public NRowsXNColumns(List&lt;T extends Div&gt; containers) {
          // Do something with each container that extends Div class
          for(T extends Div container: containers) {
              container.display();
          }
      }
  }
  </code></pre>
  
  <p>Unfortunately it doesn't compile.</p>