store different objects
<p>I want to create different classes and they should be all stored in one ArrayList.
If i use:</p>

<pre><code>interface ProgramInterface { 
   void someMethods();
}

public abstract class CustomProgram implements ProgramInterface { 
   // stuff
}
</code></pre>

<p>Then i can make my own class like</p>

<pre><code>class P_randomBars extends CustomProgram {
</code></pre>

<p>What i like about this is that the methods from the interface show up in the javadoc and from CustomProgram in the same page (CustomProgram).</p>

<p>But then i can't store them in one array (or i have to store them as object which i don't want).</p>

<p>Another way is:</p>

<pre><code>public interface CustomProgram {
   void someMethods();
}

public abstract class ProgramBase {
  // stuff
}
</code></pre>

<p>And then i create a classes like:</p>

<pre><code>class P_randomBars extends ProgramBase implements CustomProgram{
</code></pre>

<p>What i like is that i can store classes i make like that in a ArrayList. Like:
<code>ArrayList&lt;CustomProgram&gt; programs = new ArrayList&lt;CustomProgram&gt;();</code></p>

<p>But in the javadoc the abstract class and the interface are not connected which make's unclear for the user that he has to extend and then implement.</p>

<p>Is there a solution for this?</p>
