boolean (Object o) { if (this == o) return true; if (!(o instanceof TextFragment fragment)) return false; return myGrayed == fragment.myGrayed && myItalic == fragment.myItalic && Objects.equals(text, fragment.text) && Objects.equals(myFgColor, fragment.myFgColor); }