Package limn.scene
Record Class Change.TextEdit
java.lang.Object
java.lang.Record
limn.scene.Change.TextEdit
- Record Components:
origin- what moved the editoffset- where the damaged range begins, in charsremoved- how many chars it replacedinserted- how many chars it inserted
- All Implemented Interfaces:
Change
- Enclosing interface:
Change
public static record Change.TextEdit(Change.Origin origin, int offset, int removed, int inserted)
extends Record
implements Change
A text edit:
aspect() is always Change.Aspect.TEXT, so
aspect() == TEXT and instanceof Change.TextEdit are the same question in
both directions.-
Nested Class Summary
Nested classes/interfaces inherited from interface limn.scene.Change
Change.Aspect, Change.Origin, Change.State, Change.TextEdit -
Constructor Summary
ConstructorsConstructorDescriptionTextEdit(Change.Origin origin, int offset, int removed, int inserted) Creates an instance of aTextEditrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaspect()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intinserted()Returns the value of theinsertedrecord component.intoffset()Returns the value of theoffsetrecord component.origin()Returns the value of theoriginrecord component.intremoved()Returns the value of theremovedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
aspect
-
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 '=='. -
origin
Returns the value of theoriginrecord component. -
offset
public int offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
removed
public int removed()Returns the value of theremovedrecord component.- Returns:
- the value of the
removedrecord component
-
inserted
public int inserted()Returns the value of theinsertedrecord component.- Returns:
- the value of the
insertedrecord component
-