I have a java method that should check through an ArrayList and check if it contains an instance of a given class. I need to pass the method the type of class to check for a
check one of the the item instance in the list
if (object instanceof ArrayList>) {
if (((ArrayList>) object).get(0) instanceof ClassA) {
classAList= (ArrayList) object;
} else if (((ArrayList>) object).get(0) instanceof ClassB) {
classBList= (ArrayList) object;
} else if (((ArrayList>) object).get(0) instanceof ClassC) {
classCList= (ArrayList) object;
}
}