okay ignoring the weird spawner design, say i want a function that uses instanceof or some similar comparison that checks the class type of an object. i want to use this function to look through an arraylist of objects and count ow many there are of a subclass. what would i pass into the function if i wanted to vary which kind of class type it counted. ie
int count(ArrayList<BaseClass> list,??? subclass /*what do i put here*/ ){
int n = 0;
for(int i = 0;i < list.size();i ++){
if(list.get(i) instanceof subclass){
n++;
}
}
return n;
}