title: How to convert ArrayList<subClass> to ArrayList<super> in java
body: <p>I hava a method <code>setData(ArrayList&lt;super&gt; list)</code>, so anyone who want set data can have their own entity, just need to extends from super class. but when they call <code>setData</code>, how they convert ArrayList to ArrayList?</p>
  
  <p>Now i use setData(new ArrayList(list)), but it's not a good solution.</p>
  
  <p>Anyone can tell me how to convert or another solution can avoid the problem. Very appreciated!</p>