Package io.github.treesitter.jtreesitter
Record Class QueryMatch
java.lang.Object
java.lang.Record
io.github.treesitter.jtreesitter.QueryMatch
A match that corresponds to a certain pattern in the query.
-
Constructor Summary
ConstructorDescriptionQueryMatch
(int patternIndex, List<QueryCapture> captures) Creates an instance of a QueryMatch record class. -
Method Summary
Modifier and TypeMethodDescriptioncaptures()
Returns the value of thecaptures
record component.final boolean
Indicates whether some other object is "equal to" this one.Find the nodes that are captured by the given capture name.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of thepatternIndex
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
QueryMatch
Creates an instance of a QueryMatch record class.
-
-
Method Details
-
findNodes
-
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 '=='. -
patternIndex
Returns the value of thepatternIndex
record component.- Returns:
- the value of the
patternIndex
record component
-
captures
Returns the value of thecaptures
record component.- Returns:
- the value of the
captures
record component
-