Accessing functions from Java Generics

Thanks for your quick reply! I’ll try out using children classes, but overall I would like to use 1 class to keep it simple. I think my question is answered for now; Thanks to everyone who helped out!