java.util.regex
static class: Pattern.Node [javadoc |
source]
java.lang.Object
java.util.regex.Pattern$Node
Base class for all node classes. Subclasses should override the match()
method as appropriate. This class is an accepting node, so its match()
always returns true.
| Field Summary |
|---|
| Node | next | |
| Method from java.util.regex.Pattern$Node Summary: |
|---|
|
match, study |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from java.util.regex.Pattern$Node Detail: |
boolean match(Matcher matcher,
int i,
CharSequence seq) {
matcher.last = i;
matcher.groups[0] = matcher.first;
matcher.groups[1] = matcher.last;
return true;
}
This method implements the classic accept node. |
boolean study(TreeInfo info) {
if (next != null) {
return next.study(info);
} else {
return info.deterministic;
}
}
This method is good for all zero length assertions. |