Package com.evolveum.axiom.lang.antlr
Record Class PositionContext
java.lang.Object
java.lang.Record
com.evolveum.axiom.lang.antlr.PositionContext
public record PositionContext(int cursorIndex, org.antlr.v4.runtime.tree.ParseTree node)
extends Record
Position node context by cursor in parser tree.
Created by Dominik.
-
Constructor Summary
ConstructorDescriptionPositionContext
(int cursorIndex, org.antlr.v4.runtime.tree.ParseTree node) Creates an instance of aPositionContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thecursorIndex
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.org.antlr.v4.runtime.tree.ParseTree
node()
Returns the value of thenode
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PositionContext
public PositionContext(int cursorIndex, org.antlr.v4.runtime.tree.ParseTree node) Creates an instance of aPositionContext
record class.- Parameters:
cursorIndex
- the value for thecursorIndex
record componentnode
- the value for thenode
record component
-
-
Method Details
-
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 '=='. -
cursorIndex
public int cursorIndex()Returns the value of thecursorIndex
record component.- Returns:
- the value of the
cursorIndex
record component
-
node
public org.antlr.v4.runtime.tree.ParseTree node()Returns the value of thenode
record component.- Returns:
- the value of the
node
record component
-