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:

```
public class Manager {
    public static ArrayList<O> loadedHacks = new ArrayList<O>();
    public void initOs(){
        loadedHacks.add(new O());
    }
}

public class O {
    public boolean enabled = false;
    public void onEnable(){}
}

public class A extends O{
}

```

Then later I want to do something like this:

```
if(Helper.get(A.class).enabled){}

```