/** * Tests that argument object is equals to this CollationElementIterator. * Iterators are equal if the objects uses the same RuleBasedCollator, * the same source text and have the same current position in iteration. * @param that object to test if it is equals to this * CollationElementIterator * @stable ICU 2.8 */ @Override public boolean equals(Object that) { if (that == this) { return true; } if (that instanceof CollationElementIterator) { CollationElementIterator thatceiter = (CollationElementIterator) that; return rbc_.equals(thatceiter.rbc_) && otherHalf_ == thatceiter.otherHalf_ && normalizeDir() == thatceiter.normalizeDir() && string_.equals(thatceiter.string_) && iter_.equals(thatceiter.iter_); } return false; }