Package net.sf.saxon.regex.charclass
Class SingletonCharacterClass
java.lang.Object
net.sf.saxon.regex.charclass.SingletonCharacterClass
- All Implemented Interfaces:
IntPredicate,CharacterClass
- Direct Known Subclasses:
RECompiler.BackReference
A character class represents a set of characters for regex matching purposes. A singleton
character class matches exactly one character
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the set of matching characters if available.booleanisDisjoint(CharacterClass other) Ask whether this character class is known to be disjoint with another character class (that is, the two classes have no characters in common).booleantest(int value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.IntPredicate
and, negate, or
-
Constructor Details
-
SingletonCharacterClass
public SingletonCharacterClass(int codepoint)
-
-
Method Details
-
test
public boolean test(int value) - Specified by:
testin interfaceIntPredicate
-
isDisjoint
Description copied from interface:CharacterClassAsk whether this character class is known to be disjoint with another character class (that is, the two classes have no characters in common). If in doubt, return false.- Specified by:
isDisjointin interfaceCharacterClass- Parameters:
other- the other character class- Returns:
- true if the character classes are known to be disjoint; false if there may be characters in common between the two classes
-
getCodepoint
public int getCodepoint() -
getIntSet
Description copied from interface:CharacterClassGet the set of matching characters if available. If not available, return null- Specified by:
getIntSetin interfaceCharacterClass
-