Package ch.so.agi.mcp.change
Record Class IliTextPatch
java.lang.Object
java.lang.Record
ch.so.agi.mcp.change.IliTextPatch
public record IliTextPatch(IliSourceSpan span, String replacement, String description)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionIliTextPatch(IliSourceSpan span, String replacement, String description) Creates an instance of aIliTextPatchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static IliTextPatchinsert(IliSourceDocument document, int offset, String text, String description) static IliTextPatchreplace(IliSourceSpan span, String replacement, String description) Returns the value of thereplacementrecord component.span()Returns the value of thespanrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IliTextPatch
Creates an instance of aIliTextPatchrecord class.- Parameters:
span- the value for thespanrecord componentreplacement- the value for thereplacementrecord componentdescription- the value for thedescriptionrecord component
-
-
Method Details
-
replace
-
insert
public static IliTextPatch insert(IliSourceDocument document, int offset, String text, String description) -
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. All components in this record class are compared withObjects::equals(Object,Object). -
span
Returns the value of thespanrecord component.- Returns:
- the value of the
spanrecord component
-
replacement
Returns the value of thereplacementrecord component.- Returns:
- the value of the
replacementrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-