public boolean compare(String name1,String name2){
  if (isUseEquals()) {
    return name1.equals(name2);
  }
 else {
    return name1 == name2;
  }
}

public boolean compare ( String name1 , String name2 ) { if ( isUseEquals ( ) ) { return name1 . equals ( name2 ) ; } else { return name1 == name2 ; } }
performs a string comparison , using references unless the useequals property is set to true .
