/** * Compares the equality of two ReplaceableCharacterIterator objects. * @param obj the ReplaceableCharacterIterator object to be compared with. * @return true if the given obj is the same as this * ReplaceableCharacterIterator object; false otherwise. */ public override bool Equals(object obj) { if (this == obj) { return(true); } if (!(obj is ReplaceableCharacterIterator)) { return(false); } ReplaceableCharacterIterator that = (ReplaceableCharacterIterator)obj; if (GetHashCode() != that.GetHashCode()) { return(false); } if (!text.Equals(that.text)) { return(false); } if (pos != that.pos || begin != that.begin || end != that.end) { return(false); } return(true); }
/** * Creates a copy of this iterator. * @return A copy of this */ public override object Clone() { ReplaceableCharacterIterator other = (ReplaceableCharacterIterator)base.MemberwiseClone(); return(other); }