java.lang.Object
java.lang.Record
org.aya.pretty.error.LineColSpan
- All Implemented Interfaces:
Span
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aya.pretty.error.Span
Span.Data, Span.NowLoc -
Constructor Summary
ConstructorsConstructorDescriptionLineColSpan(@NotNull String input, int startLine, int startCol, int endLine, int endCol) Creates an instance of aLineColSpanrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintendCol()Returns the value of theendColrecord component.intendLine()Returns the value of theendLinerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringinput()Returns the value of theinputrecord component.normalize(PrettyErrorConfig config) intstartCol()Returns the value of thestartColrecord component.intReturns the value of thestartLinerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LineColSpan
public LineColSpan(@NotNull @NotNull String input, int startLine, int startCol, int endLine, int endCol) Creates an instance of aLineColSpanrecord class.- Parameters:
input- the value for theinputrecord componentstartLine- the value for thestartLinerecord componentstartCol- the value for thestartColrecord componentendLine- the value for theendLinerecord componentendCol- the value for theendColrecord component
-
-
Method Details
-
normalize
-
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 '=='. -
input
Returns the value of theinputrecord component. -
startLine
public int startLine()Returns the value of thestartLinerecord component.- Returns:
- the value of the
startLinerecord component
-
startCol
public int startCol()Returns the value of thestartColrecord component.- Returns:
- the value of the
startColrecord component
-
endLine
public int endLine()Returns the value of theendLinerecord component.- Returns:
- the value of the
endLinerecord component
-
endCol
public int endCol()Returns the value of theendColrecord component.- Returns:
- the value of the
endColrecord component
-