Hey guys!
I've been struggling for way too long to figure this out. The hardest thing is I don't know what the proper terminology if for this situation is so googling didn't help much.
Here's the situation:
I have a class that has the <E> thing in it (what is that type of class called?) It looks like this:
public class Conditional<E> extends MenuItem { ... }
Elsewhere I want to check if a MenuItem is an instance of a Conditional<Player>
However, if I do:
if (menuItem instanceof Conditional<Player>) { ... }
It says ''MenuItem' cannot be safely cast to 'Conditional<Player>'
Simply casting to Conditional works, but I would like to know specifically what's inside the "<>"
This is the first time I'm making classes with <> in them (can't figure out what those are called) so I'm quite confused about all this :P
Any help or guidance is much appreciated!