private static boolean compareStringCase(final String val,final int comparator,final String attr){
  final String value=comparator == APPROX ? stripWhitespaces(val) : val;
  final String attribute=comparator == APPROX ? stripWhitespaces(attr) : attr;
switch (comparator) {
case APPROX:
case EQUALS:
    return RFC1960Filter.stringCompare(value.toCharArray(),0,attribute.toCharArray(),0) == 0;
case GREATER:
  return RFC1960Filter.stringCompare(value.toCharArray(),0,attribute.toCharArray(),0) <= 0;
case LESS:
return RFC1960Filter.stringCompare(value.toCharArray(),0,attribute.toCharArray(),0) >= 0;
default :
throw new IllegalStateException("Found illegal comparator.");
}
}

private static boolean compareStringCase ( final String val , final int comparator , final String attr ) { final String value = comparator == APPROX ? stripWhitespaces ( val ) : val ; final String attribute = comparator == APPROX ? stripWhitespaces ( attr ) : attr ; switch ( comparator ) { case APPROX : case EQUALS : return RFC1960Filter . stringCompare ( value . toCharArray ( ) , 0 , attribute . toCharArray ( ) , 0 ) == 0 ; case GREATER : return RFC1960Filter . stringCompare ( value . toCharArray ( ) , 0 , attribute . toCharArray ( ) , 0 ) <= 0 ; case LESS : return RFC1960Filter . stringCompare ( value . toCharArray ( ) , 0 , attribute . toCharArray ( ) , 0 ) >= 0 ; default : throw new IllegalStateException ( "Found illegal comparator." ) ; } }
compare a string . case sensitive
