Record Class MultiMatcher.MultiMatchResult<N extends Tree>
java.lang.Object
java.lang.Record
com.google.errorprone.matchers.MultiMatcher.MultiMatchResult<N>
- Record Components:
matches- True if the MultiMatcher matched the nodes expected.matchingNodes- The list of nodes which matched the MultiMatcher's expectations (could be empty if the match type was ALL and there were no child nodes). Only sensical ifmatches()is true.
- Enclosing interface:
MultiMatcher<T extends Tree, N extends Tree>
public static record MultiMatcher.MultiMatchResult<N extends Tree>(boolean matches, com.google.common.collect.ImmutableList<N extends Tree> matchingNodes)
extends Record
A result from the call of
MultiMatcher.multiMatchResult(Tree, VisitorState), containing
information about whether it matched, and if so, what nodes matched.- Author:
- eaftan@google.com (Eddie Aftandilian)
-
Constructor Summary
ConstructorsConstructorDescriptionMultiMatchResult(boolean matches, com.google.common.collect.ImmutableList<N> matchingNodes) Creates an instance of aMultiMatchResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatches()Returns the value of thematchesrecord component.com.google.common.collect.ImmutableList<N> Returns the value of thematchingNodesrecord component.final Nfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MultiMatchResult
Creates an instance of aMultiMatchResultrecord class.- Parameters:
matches- the value for thematchesrecord componentmatchingNodes- the value for thematchingNodesrecord component
-
-
Method Details
-
onlyMatchingNode
-
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 thecomparemethod from their corresponding wrapper classes. -
matches
-
matchingNodes
Returns the value of thematchingNodesrecord component.- Returns:
- the value of the
matchingNodesrecord component
-