title: How to make a class that collects static data?
body: <p>Let's say that we have a <code>Condition</code> class.</p>
  
  <pre><code>public abstract class Condition&lt;T&gt;
  {
      private List&lt;T&gt; _list = new ArrayList&lt;&gt;();
  
      // add, remove, get methods
  }
  </code></pre>
  
  <p>If we make another class that extends the <code>Condition</code> class, how can I keep the objects stored if I make a new instance of that class?</p>
  
  <p>For example:</p>
  
  <pre><code>SampleCondition c1 = new SampleCondition();
  c1.addItem("text");
  
  SampleCondition c2 = new SampleCondition();
  c2.addItem("more text");
  </code></pre>
  
  <p>Those two classes won't contain both "text" and "more text". The only possible way I could think of is to make the class a singleton, however that's not the best practice, any suggestions are much appreciated.</p>
  
  <p>Edit: If I make the <code>_list</code> field static, would another class extending the Condition class share the stored objects in SampleCondition class?</p>