Package com.dua3.utility.ui
Record Class RichTextEditHistory.TextReplaceHistoryEntry
java.lang.Object
java.lang.Record
com.dua3.utility.ui.RichTextEditHistory.TextReplaceHistoryEntry
- Record Components:
start- replacement start offsetremovedText- removed textinsertedText- inserted textbeforeAnchor- anchor before changebeforeCaret- caret before changeafterAnchor- anchor after changeafterCaret- 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 Summary
ConstructorsConstructorDescriptionTextReplaceHistoryEntry(int start, RichText removedText, RichText insertedText, int beforeAnchor, int beforeCaret, int afterAnchor, int afterCaret) Creates an instance of aTextReplaceHistoryEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theafterAnchorrecord component.intReturns the value of theafterCaretrecord component.intReturns the value of thebeforeAnchorrecord component.intReturns the value of thebeforeCaretrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinsertedTextrecord component.Returns the value of theremovedTextrecord component.intstart()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TextReplaceHistoryEntry
public TextReplaceHistoryEntry(int start, RichText removedText, RichText insertedText, int beforeAnchor, int beforeCaret, int afterAnchor, int afterCaret) Creates an instance of aTextReplaceHistoryEntryrecord class.- Parameters:
start- the value for thestartrecord componentremovedText- the value for theremovedTextrecord componentinsertedText- the value for theinsertedTextrecord componentbeforeAnchor- the value for thebeforeAnchorrecord componentbeforeCaret- the value for thebeforeCaretrecord componentafterAnchor- the value for theafterAnchorrecord componentafterCaret- the value for theafterCaretrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
start
public int start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
removedText
Returns the value of theremovedTextrecord component.- Returns:
- the value of the
removedTextrecord component
-
insertedText
Returns the value of theinsertedTextrecord component.- Returns:
- the value of the
insertedTextrecord component
-
beforeAnchor
public int beforeAnchor()Returns the value of thebeforeAnchorrecord component.- Returns:
- the value of the
beforeAnchorrecord component
-
beforeCaret
public int beforeCaret()Returns the value of thebeforeCaretrecord component.- Returns:
- the value of the
beforeCaretrecord component
-
afterAnchor
public int afterAnchor()Returns the value of theafterAnchorrecord component.- Returns:
- the value of the
afterAnchorrecord component
-
afterCaret
public int afterCaret()Returns the value of theafterCaretrecord component.- Returns:
- the value of the
afterCaretrecord component
-