title: Java arraylist addAll with generic type
body: <p>I have a java class</p>
  
  <pre><code>public class PointCloud&lt;T extends Point&gt;
  {
      protected ArrayList&lt;T &gt; points = null;
  
      public ArrayList&lt;T&gt; getPoints()
      {
          return points;
      }
  
      public void addPoints(ArrayList&lt;T&gt; arrayList)
      {
           this.points.addAll(arrayList);
      }
  
       public static PointCloud&lt;? extends Point&gt; combine(ArrayList&lt;PointCloud&lt;? extends Point&gt;&gt; pcList)
      {
          PointCloud&lt;? extends Point&gt; combinated_pc = new PointCloud&lt;&gt;();
  
          for(PointCloud&lt;? extends Point&gt; pc: pcList)
          {
              combinated_pc.addPoints(pc.getPoints());
          }
  
          return combinated_pc;
      }
  }
  </code></pre>
  
  <p>My java error is : </p>
  
  <blockquote>
    <p>The method <code>addPoints(ArrayList &lt; capture#8-of ? extends Point&gt;)</code> in the
    type <code>PointCloud&lt;capture#8-of ? extends Point&gt;</code> is not applicable for
    the arguments (<code>ArrayList &lt; capture#9-of ? extends Point&gt;</code>)</p>
  </blockquote>