Adding parent class to arraylist with internal function

Sorry, I’m not too good at cutting down code… I didn’t redefine .add, its a built-in java function that allows you to add an element in at a given position, Z is meant to be the variable that stores the position. Anything else?