protected static Set updateAndGetRemovableOCs(Set origSet,Set removeOCs){
  Set returnOCs=removeOCs;
  if (removeOCs != null && !removeOCs.isEmpty()) {
    returnOCs=new HashSet();
    Iterator itr1=origSet.iterator();
    while (itr1.hasNext()) {
      String origOC=(String)itr1.next();
      Iterator itr2=removeOCs.iterator();
      while (itr2.hasNext()) {
        String removeOC=(String)itr2.next();
        if (origOC.equalsIgnoreCase(removeOC)) {
          returnOCs.add(origOC);
          break;
        }
      }
    }
    origSet.removeAll(returnOCs);
  }
  return returnOCs;
}

protected static Set updateAndGetRemovableOCs ( Set origSet , Set removeOCs ) { Set returnOCs = removeOCs ; if ( removeOCs != null && ! removeOCs . isEmpty ( ) ) { returnOCs = new HashSet ( ) ; Iterator itr1 = origSet . iterator ( ) ; while ( itr1 . hasNext ( ) ) { String origOC = ( String ) itr1 . next ( ) ; Iterator itr2 = removeOCs . iterator ( ) ; while ( itr2 . hasNext ( ) ) { String removeOC = ( String ) itr2 . next ( ) ; if ( origOC . equalsIgnoreCase ( removeOC ) ) { returnOCs . add ( origOC ) ; break ; } } } origSet . removeAll ( returnOCs ) ; } return returnOCs ; }
method which removes the specified object class from original set and returns the set of object classes that were removed .
