@Override public boolean equals(Object that){
  try {
    if (that == null) {
      return false;
    }
    RuleBasedBreakIterator other=(RuleBasedBreakIterator)that;
    if (checksum != other.checksum) {
      return false;
    }
    if (text == null) {
      return other.text == null;
    }
 else {
      return text.equals(other.text);
    }
  }
 catch (  ClassCastException e) {
    return false;
  }
}

@ Override public boolean equals ( Object that ) { try { if ( that == null ) { return false ; } RuleBasedBreakIterator other = ( RuleBasedBreakIterator ) that ; if ( checksum != other . checksum ) { return false ; } if ( text == null ) { return other . text == null ; } else { return text . equals ( other . text ) ; } } catch ( ClassCastException e ) { return false ; } }
returns true if both breakiterators are of the same class , have the same rules , and iterate over the same text .
