This code has been giving me problems. all I want to do is create methods that will allow me to add generics to this array list. Using an Array List is not necessary if there is a better class that works well with generics. before I get useless answers these objects are initialized in the constructor of the object they are in. and the getters and setters exist. the problem is that the .add() method in array list is not accepting generics
private ArrayList<? extends Inputable> inputSubscriber;
private ArrayList<? extends Updateable> updateSubscriber;
private ArrayList<? extends Renderable> renderSubsciber;
public <e extends Inputable> void subscribeToInput(e inputable){
this.getInputSubscriber().add(inputable);
}
public <e extends Updateable> void subscribeToUpdate(e updateable){
this.getUpdateSubscriber().add(updateable);
}
public <e extends Renderable> void subscribeToRender(e renderable){
this.getRenderSubsciber().add(renderable);
}