how to check if an element is of a certain class in java code example
Example: java check if class is subclass
boolean is_subclass = Superclass.class.isAssignableFrom(Subclass.class);
// example:
// List.class.isAssignableFrom(LinkedList.class) is true
// List.class.isAssignableFrom(HashMap.class) is false