public static boolean allInstancesOf(Class<?> clazz,Object[] objs){
  for (  Object obj : objs) {
    if (!clazz.isInstance(obj))     return false;
  }
  return true;
}

public static boolean allInstancesOf ( Class < ? > clazz , Object [ ] objs ) { for ( Object obj : objs ) { if ( ! clazz . isInstance ( obj ) ) return false ; } return true ; }
returns whether all objects are instances of a given class .
