title: Get a specific class from an ArrayList
body: <p>I am working on a project in which I need to add a ton of objects to an ArrayList and then call specific functions in them later on. I have this part down but in my program I need to access specific instances from the ArrayList with only the parameter of the class I am looking for.
  For example:</p>
  
  <pre><code>public class Manager {
      public static ArrayList&lt;O&gt; loadedHacks = new ArrayList&lt;O&gt;();
      public void initOs(){
          loadedHacks.add(new O());
      }
  }
  
  public class O {
      public boolean enabled = false;
      public void onEnable(){}
  }
  
  public class A extends O{
  }
  </code></pre>
  
  <p>Then later I want to do something like this:</p>
  
  <pre><code>if(Helper.get(A.class).enabled){}
  </code></pre>