public boolean equals(Object o) {
    if (this == o) return true;
    if (!(o instanceof DocumentFragment documentFragment)) return false;

    if (!myDocument.equals(documentFragment.myDocument)) return false;
    if (!myTextRange.equals(documentFragment.myTextRange)) return false;

    return true;
  }
public boolean equals(Object o)