Package io.github.treesitter.jtreesitter
Record Class Range
java.lang.Object
java.lang.Record
io.github.treesitter.jtreesitter.Range
@NullMarked
public record Range(Point startPoint, Point endPoint, int startByte, int endByte)
extends Record
A range of positions in a text document,
both in terms of bytes and of row-column points.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
endByte()
Returns the value of theendByte
record component.endPoint()
Returns the value of theendPoint
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of thestartByte
record component.Returns the value of thestartPoint
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
Range
Creates an instance of a Range record class.- Throws:
IllegalArgumentException
- IfstartPoint > endPoint
orstartByte > endByte
.
-
-
Method Details
-
toString
-
hashCode
-
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 '=='. -
startPoint
Returns the value of thestartPoint
record component.- Returns:
- the value of the
startPoint
record component
-
endPoint
Returns the value of theendPoint
record component.- Returns:
- the value of the
endPoint
record component
-
startByte
Returns the value of thestartByte
record component.- Returns:
- the value of the
startByte
record component
-
endByte
Returns the value of theendByte
record component.- Returns:
- the value of the
endByte
record component
-