Class CharMatcher
java.lang.Object
com.oracle.truffle.regex.tregex.matchers.CharMatcher
- Direct Known Subclasses:
AnyMatcher,EmptyMatcher,InvertibleCharMatcher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intConservatively estimate the equivalent number of integer comparisons of callingmatch(int).abstract booleanmatch(int c) Check if a given code point matches thisCharMatcher.
-
Constructor Details
-
CharMatcher
public CharMatcher()
-
-
Method Details
-
match
public abstract boolean match(int c) Check if a given code point matches thisCharMatcher.- Parameters:
c- any code point.- Returns:
trueif the character matches.- See Also:
-
estimatedCost
public abstract int estimatedCost()Conservatively estimate the equivalent number of integer comparisons of callingmatch(int).- Returns:
- the number of integer comparisons one call to
match(int)is roughly equivalent to. Array loads are treated as two comparisons.
-