java.util.regex
abstract static class: Pattern.CharProperty [javadoc |
source]
java.lang.Object
java.util.regex.Pattern.Node
java.util.regex.Pattern$CharProperty
Direct Known Subclasses:
Utype, Block, SingleU, SingleS, SingleI, CloneableProperty, Single, Dot, Ctype, All, Category, BmpCharProperty, Script, UnixDot, BitClass
Abstract node class to match one character satisfying some
boolean property.
| Methods from java.util.regex.Pattern$Node: |
|---|
|
match, study |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from java.util.regex.Pattern$CharProperty Detail: |
CharProperty complement() {
return new CharProperty() {
boolean isSatisfiedBy(int ch) {
return ! CharProperty.this.isSatisfiedBy(ch);}};
}
|
abstract boolean isSatisfiedBy(int ch)
|
boolean match(Matcher matcher,
int i,
CharSequence seq) {
if (i < matcher.to) {
int ch = Character.codePointAt(seq, i);
return isSatisfiedBy(ch)
&& next.match(matcher, i+Character.charCount(ch), seq);
} else {
matcher.hitEnd = true;
return false;
}
}
|
boolean study(TreeInfo info) {
info.minLength++;
info.maxLength++;
return next.study(info);
}
|