protected boolean areEqual(String string1,String string2,boolean caseMatters){
  return (caseMatters && string1.equals(string2)) || (!caseMatters && string1.equalsIgnoreCase(string2));
}

protected boolean areEqual ( String string1 , String string2 , boolean caseMatters ) { return ( caseMatters && string1 . equals ( string2 ) ) || ( ! caseMatters && string1 . equalsIgnoreCase ( string2 ) ) ; }
compares the two strings .
