public static boolean isObjectClassPresent(Set objectClasses,String objectClass){
  if (objectClasses != null && !objectClasses.isEmpty()) {
    Iterator itr=objectClasses.iterator();
    while (itr.hasNext()) {
      String serviceOC=(String)itr.next();
      if (serviceOC.equalsIgnoreCase(objectClass)) {
        return true;
      }
    }
  }
  return false;
}

public static boolean isObjectClassPresent ( Set objectClasses , String objectClass ) { if ( objectClasses != null && ! objectClasses . isEmpty ( ) ) { Iterator itr = objectClasses . iterator ( ) ; while ( itr . hasNext ( ) ) { String serviceOC = ( String ) itr . next ( ) ; if ( serviceOC . equalsIgnoreCase ( objectClass ) ) { return true ; } } } return false ; }
method to compare all the object classes in the set with the specfied object class . will do a case insensitive comparision .
