public static boolean compareCaseInsensitiveMapOfSetOfStrings(Map<String,Set<String>> valA,Map<String,Set<String>> valB){
  if (valA == valB) {
    return true;
  }
  if ((valA == null) || (valB == null)) {
    return false;
  }
  if (valA.size() != valB.size()) {
    return false;
  }
  if (valA.size() == 0) {
    return true;
  }
  for (  Map.Entry<String,Set<String>> valAEntry : valA.entrySet()) {
    Set<String> valBValues=valB.get(valAEntry.getKey());
    Set<String> valAValues=valAEntry.getValue();
    if (valBValues == null) {
      if (valAValues != null) {
        return false;
      }
      continue;
    }
    if (valAValues.size() != valBValues.size()) {
      return false;
    }
    if (valAValues.size() == 0) {
      continue;
    }
    for (    String valAValueString : valAValues) {
      if (valAValueString == null) {
        boolean bFoundNull=false;
        for (        String nullTestInValBString : valBValues) {
          bFoundNull=nullTestInValBString == null;
          if (bFoundNull) {
            break;
          }
        }
        if (!bFoundNull) {
          return false;
        }
        continue;
      }
      boolean bFound=false;
      for (      String valBValueString : valBValues) {
        bFound=StringUtils.compareCaseInsensitiveString(valAValueString,valBValueString);
        if (bFound) {
          break;
        }
      }
      if (!bFound) {
        return false;
      }
    }
  }
  return true;
}

public static boolean compareCaseInsensitiveMapOfSetOfStrings ( Map < String , Set < String > > valA , Map < String , Set < String > > valB ) { if ( valA == valB ) { return true ; } if ( ( valA == null ) || ( valB == null ) ) { return false ; } if ( valA . size ( ) != valB . size ( ) ) { return false ; } if ( valA . size ( ) == 0 ) { return true ; } for ( Map . Entry < String , Set < String > > valAEntry : valA . entrySet ( ) ) { Set < String > valBValues = valB . get ( valAEntry . getKey ( ) ) ; Set < String > valAValues = valAEntry . getValue ( ) ; if ( valBValues == null ) { if ( valAValues != null ) { return false ; } continue ; } if ( valAValues . size ( ) != valBValues . size ( ) ) { return false ; } if ( valAValues . size ( ) == 0 ) { continue ; } for ( String valAValueString : valAValues ) { if ( valAValueString == null ) { boolean bFoundNull = false ; for ( String nullTestInValBString : valBValues ) { bFoundNull = nullTestInValBString == null ; if ( bFoundNull ) { break ; } } if ( ! bFoundNull ) { return false ; } continue ; } boolean bFound = false ; for ( String valBValueString : valBValues ) { bFound = StringUtils . compareCaseInsensitiveString ( valAValueString , valBValueString ) ; if ( bFound ) { break ; } } if ( ! bFound ) { return false ; } } } return true ; }
compares two map collections containing sets of strings in a case insensitive manner .
