public abstract class GenericPatternMatch extends BasePatternMatch
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Object |
get(int position)
Returns the value of the parameter at the given position, or null if position is invalid.
|
java.lang.Object |
get(java.lang.String parameterName)
Returns the value of the parameter with the given name, or null if name is invalid.
|
int |
hashCode() |
static GenericPatternMatch |
newEmptyMatch(GenericQuerySpecification<? extends GenericPatternMatcher> specification)
Returns an empty, mutable match.
|
static GenericPatternMatch |
newMatch(GenericQuerySpecification<? extends GenericPatternMatcher> specification,
java.lang.Object... parameters)
Returns a new (partial) match.
|
static GenericPatternMatch |
newMutableMatch(GenericQuerySpecification<? extends GenericPatternMatcher> specification,
java.lang.Object... parameters)
Returns a mutable (partial) match.
|
java.lang.String |
prettyPrint()
Prints the list of parameter-value pairs.
|
boolean |
set(java.lang.String parameterName,
java.lang.Object newValue)
Sets the parameter with the given name to the given value.
|
GenericQuerySpecification<? extends GenericPatternMatcher> |
specification() |
java.lang.Object[] |
toArray()
Converts the match to an array representation, with each pattern parameter at their respective position.
|
IPatternMatch |
toImmutable()
Takes an immutable snapshot of this match.
|
isCompatibleWith, makeImmutableList, parameterNames, patternName, prettyPrintFeature, prettyPrintValue, set, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isMutable
public java.lang.Object get(java.lang.String parameterName)
IPatternMatch
public java.lang.Object get(int position)
IPatternMatch
get
in interface IPatternMatch
get
in class BasePatternMatch
public boolean set(java.lang.String parameterName, java.lang.Object newValue)
IPatternMatch
Works only if match is mutable. See IPatternMatch.isMutable()
.
public java.lang.Object[] toArray()
IPatternMatch
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String prettyPrint()
IPatternMatch
public GenericQuerySpecification<? extends GenericPatternMatcher> specification()
public static GenericPatternMatch newEmptyMatch(GenericQuerySpecification<? extends GenericPatternMatcher> specification)
public static GenericPatternMatch newMutableMatch(GenericQuerySpecification<? extends GenericPatternMatcher> specification, java.lang.Object... parameters)
parameters
- the fixed value of pattern parameters, or null if not bound.public static GenericPatternMatch newMatch(GenericQuerySpecification<? extends GenericPatternMatcher> specification, java.lang.Object... parameters)
The returned match will be immutable. Use newEmptyMatch(GenericQuerySpecification)
to obtain a mutable match object.
parameters
- the fixed value of pattern parameters, or null if not bound.public IPatternMatch toImmutable()
IPatternMatch