title: How do I parameterize an extended Collection
body: <p>I've been trying to extend the ArrayList class without much success. I want to extend it, and be able to parameterize it.</p>
  
  <p>So normally you have something like</p>
  
  <pre><code>ArrayList&lt;SomeObject&gt; list = new ArrayList&lt;SomeObject&gt;();
  </code></pre>
  
  <p>I want </p>
  
  <pre><code>MyList&lt;SomeObject&gt; list = new MyList&lt;SomeObject&gt;();
  </code></pre>
  
  <p>Simply extending ArrayList doesn't work.</p>
  
  <pre><code>public class MyList extends ArrayList ...
  </code></pre>
  
  <p>The when I try to use it I get the error</p>
  
  <blockquote>
    <p>The type MyList is not generic; it
    cannot be parameterized with arguments
    &lt;SomeObject&gt;</p>
  </blockquote>
  
  <p>I've tried variations of </p>
  
  <pre><code>public class MyList extends ArrayList&lt;Object&gt;
  public class MyList&lt;SubObject&gt; extends ArrayList&lt;Object&gt;
  </code></pre>
  
  <p>with no success, If I use the subobject behind the class name it appears to work, but hides methods in the subobject class for some reason.</p>
  
  <p>Any thoughts or suggestions on how to get this working right are appreciated.</p>