public class BasicSequenceMatchResult<T> extends java.lang.Object implements SequenceMatchResult<T>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
BasicSequenceMatchResult.MatchedGroup |
SequenceMatchResult.GroupToIntervalFunc<MR extends java.util.regex.MatchResult>, SequenceMatchResult.MatchedGroupInfo<T>DEFAULT_COMPARATOR, GROUP_AFTER_MATCH, GROUP_BEFORE_MATCH, LENGTH_COMPARATOR, OFFSET_COMPARATOR, ORDER_COMPARATOR, PRIORITY_COMPARATOR, PRIORITY_SCORE_LENGTH_ORDER_OFFSET_COMPARATOR, SCORE_COMPARATOR, SCORER, TO_INTERVALCONTAINS_FIRST_ENDPOINTS_COMPARATOR, ENDPOINTS_COMPARATOR, LENGTH_ENDPOINTS_COMPARATOR, NESTED_FIRST_ENDPOINTS_COMPARATOR| Constructor and Description |
|---|
BasicSequenceMatchResult() |
| Modifier and Type | Method and Description |
|---|---|
BasicSequenceMatchResult<T> |
copy() |
java.util.List<? extends T> |
elements()
Returns the original sequence the match was performed on.
|
int |
end() |
int |
end(int group) |
int |
end(java.lang.String var)
Returns the index of the next element after the subsequence captured by the given group
during this match.
|
Interval<java.lang.Integer> |
getInterval()
Returns the interval
|
int |
getOrder() |
java.lang.String |
group() |
java.lang.String |
group(int group) |
java.lang.String |
group(java.lang.String var)
Returns the
String representing the matched group. |
int |
groupCount() |
SequenceMatchResult.MatchedGroupInfo<T> |
groupInfo() |
SequenceMatchResult.MatchedGroupInfo<T> |
groupInfo(int group) |
SequenceMatchResult.MatchedGroupInfo<T> |
groupInfo(java.lang.String var) |
java.lang.Object |
groupMatchResult(int group,
int index)
Returns an Object representing the result for the match for a particular node in a group.
|
java.lang.Object |
groupMatchResult(java.lang.String var,
int index)
Returns an Object representing the result for the match for a particular node in a group.
|
java.util.List<java.lang.Object> |
groupMatchResults()
Returns a list of Objects representing the match results for the entire sequence.
|
java.util.List<java.lang.Object> |
groupMatchResults(int group)
Returns a list of Objects representing the match results for the nodes in the group.
|
java.util.List<java.lang.Object> |
groupMatchResults(java.lang.String var)
Returns a list of Objects representing the match results for the nodes in the group.
|
java.util.List<T> |
groupNodes()
Returns the entire matched subsequence as a list.
|
java.util.List<T> |
groupNodes(int group)
Returns the matched group as a list.
|
java.util.List<? extends T> |
groupNodes(java.lang.String var)
Returns the matched group as a list.
|
java.lang.Object |
groupValue()
Returns the value (some Object) associated with the entire matched sequence.
|
java.lang.Object |
groupValue(int group)
Returns the value (some Object) associated with the captured group.
|
java.lang.Object |
groupValue(java.lang.String var)
Returns the value (some Object) associated with the captured group.
|
java.lang.Object |
nodeMatchResult(int index)
Returns an Object representing the result for the match for a particular node.
|
SequencePattern<T> |
pattern()
Returns pattern used to create this sequence match result
|
double |
priority() |
double |
score() |
void |
setOrder(int order) |
int |
start() |
int |
start(int group) |
int |
start(java.lang.String var)
Returns the start index of the subsequence captured by the given group
during this match.
|
BasicSequenceMatchResult<T> |
toBasicSequenceMatchResult() |
public java.util.List<? extends T> elements()
SequenceMatchResultelements in interface SequenceMatchResult<T>public SequencePattern<T> pattern()
SequenceMatchResultpattern in interface SequenceMatchResult<T>public BasicSequenceMatchResult<T> toBasicSequenceMatchResult()
toBasicSequenceMatchResult in interface SequenceMatchResult<T>public BasicSequenceMatchResult<T> copy()
public Interval<java.lang.Integer> getInterval()
HasIntervalgetInterval in interface HasInterval<java.lang.Integer>public int getOrder()
getOrder in interface SequenceMatchResult<T>public void setOrder(int order)
public double priority()
priority in interface SequenceMatchResult<T>public double score()
score in interface SequenceMatchResult<T>public int start()
start in interface java.util.regex.MatchResultpublic int start(int group)
start in interface java.util.regex.MatchResultpublic int start(java.lang.String var)
SequenceMatchResultstart in interface SequenceMatchResult<T>var - The name of the capturing group in this matcher's patternpublic int end()
end in interface java.util.regex.MatchResultpublic int end(int group)
end in interface java.util.regex.MatchResultpublic int end(java.lang.String var)
SequenceMatchResultend in interface SequenceMatchResult<T>var - The name of the capturing group in this matcher's patternpublic java.lang.String group()
group in interface java.util.regex.MatchResultpublic java.lang.String group(int group)
group in interface java.util.regex.MatchResultpublic java.lang.String group(java.lang.String var)
SequenceMatchResultString representing the matched group.group in interface SequenceMatchResult<T>var - The name of the capturing group in this matcher's patternString
or null if there is no capturing group in the pattern
with the given namepublic java.util.List<T> groupNodes()
SequenceMatchResultgroupNodes in interface SequenceMatchResult<T>public java.util.List<T> groupNodes(int group)
SequenceMatchResultgroupNodes in interface SequenceMatchResult<T>group - The index of a capturing group in this matcher's patternpublic java.util.List<? extends T> groupNodes(java.lang.String var)
SequenceMatchResultgroupNodes in interface SequenceMatchResult<T>var - The name of the capturing group in this matcher's patternpublic java.lang.Object groupValue()
SequenceMatchResultgroupValue in interface SequenceMatchResult<T>public java.lang.Object groupValue(int group)
SequenceMatchResultgroupValue in interface SequenceMatchResult<T>group - The index of a capturing group in this matcher's patternpublic java.lang.Object groupValue(java.lang.String var)
SequenceMatchResultgroupValue in interface SequenceMatchResult<T>var - The name of the capturing group in this matcher's patternpublic SequenceMatchResult.MatchedGroupInfo<T> groupInfo()
groupInfo in interface SequenceMatchResult<T>public SequenceMatchResult.MatchedGroupInfo<T> groupInfo(int group)
groupInfo in interface SequenceMatchResult<T>public SequenceMatchResult.MatchedGroupInfo<T> groupInfo(java.lang.String var)
groupInfo in interface SequenceMatchResult<T>public int groupCount()
groupCount in interface java.util.regex.MatchResultpublic java.util.List<java.lang.Object> groupMatchResults()
SequenceMatchResultgroupMatchResults in interface SequenceMatchResult<T>public java.util.List<java.lang.Object> groupMatchResults(int group)
SequenceMatchResultgroupMatchResults in interface SequenceMatchResult<T>group - The index of a capturing group in this matcher's patternpublic java.util.List<java.lang.Object> groupMatchResults(java.lang.String var)
SequenceMatchResultgroupMatchResults in interface SequenceMatchResult<T>var - The name of the capturing group in this matcher's patternpublic java.lang.Object nodeMatchResult(int index)
SequenceMatchResultMap<Class, Object>, while
for String, the match result is typically a MatchResult.nodeMatchResult in interface SequenceMatchResult<T>index - The index of the element in the original sequence.public java.lang.Object groupMatchResult(int group,
int index)
SequenceMatchResultMap<Class, Object>, while
for String, the match result is typically a MatchResult.groupMatchResult in interface SequenceMatchResult<T>group - The index of a capturing group in this matcher's patternindex - The index of the element in the captured subsequence.public java.lang.Object groupMatchResult(java.lang.String var,
int index)
SequenceMatchResultMap<Class, Object>, while
for String, the match result is typically a MatchResult.groupMatchResult in interface SequenceMatchResult<T>var - The name of the capturing group in this matcher's patternindex - The index of the element in the captured subsequence.