Record Class RichTextEditHistory.TextReplaceHistoryEntry

java.lang.Object
java.lang.Record
com.dua3.utility.ui.RichTextEditHistory.TextReplaceHistoryEntry
Record Components:
start - replacement start offset
removedText - removed text
insertedText - inserted text
beforeAnchor - anchor before change
beforeCaret - caret before change
afterAnchor - anchor after change
afterCaret - caret after change
Enclosing class:
RichTextEditHistory

public static record RichTextEditHistory.TextReplaceHistoryEntry(int start, RichText removedText, RichText insertedText, int beforeAnchor, int beforeCaret, int afterAnchor, int afterCaret) extends Record
One text replacement history entry.
  • Constructor Details

    • TextReplaceHistoryEntry

      public TextReplaceHistoryEntry(int start, RichText removedText, RichText insertedText, int beforeAnchor, int beforeCaret, int afterAnchor, int afterCaret)
      Creates an instance of a TextReplaceHistoryEntry record class.
      Parameters:
      start - the value for the start record component
      removedText - the value for the removedText record component
      insertedText - the value for the insertedText record component
      beforeAnchor - the value for the beforeAnchor record component
      beforeCaret - the value for the beforeCaret record component
      afterAnchor - the value for the afterAnchor record component
      afterCaret - the value for the afterCaret record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • start

      public int start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • removedText

      public RichText removedText()
      Returns the value of the removedText record component.
      Returns:
      the value of the removedText record component
    • insertedText

      public RichText insertedText()
      Returns the value of the insertedText record component.
      Returns:
      the value of the insertedText record component
    • beforeAnchor

      public int beforeAnchor()
      Returns the value of the beforeAnchor record component.
      Returns:
      the value of the beforeAnchor record component
    • beforeCaret

      public int beforeCaret()
      Returns the value of the beforeCaret record component.
      Returns:
      the value of the beforeCaret record component
    • afterAnchor

      public int afterAnchor()
      Returns the value of the afterAnchor record component.
      Returns:
      the value of the afterAnchor record component
    • afterCaret

      public int afterCaret()
      Returns the value of the afterCaret record component.
      Returns:
      the value of the afterCaret record component