java.lang.Object
java.lang.Record
org.aya.pretty.error.Span.Data
- Enclosing interface:
Span
-
Constructor Summary
ConstructorsConstructorDescriptionData(int startLine, int startCol, int endLine, int endCol) Creates an instance of aDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(int line, int column) intendCol()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.intstartCol()Returns the value of thestartColrecord component.intReturns the value of thestartLinerecord component.final StringtoString()Returns a string representation of this record class.@NotNull Span.Data
-
Constructor Details
-
Data
public Data(int startLine, int startCol, int endLine, int endCol) Creates an instance of aDatarecord class.- Parameters:
startLine- the value for thestartLinerecord componentstartCol- the value for thestartColrecord componentendLine- the value for theendLinerecord componentendCol- the value for theendColrecord component
-
-
Method Details
-
contains
public boolean contains(int line, int column) -
union
-
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 with '=='. -
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
-