Package net.sf.saxon.regex.charclass
Class Categories.Category
- java.lang.Object
-
- net.sf.saxon.regex.charclass.Categories.Category
-
- All Implemented Interfaces:
java.util.function.IntPredicate,CharacterClass
- Enclosing class:
- Categories
public static class Categories.Category extends java.lang.Object implements CharacterClass
A Category is a CharacterClass represented in a regular expression as \p{Xx}. The label Xx is retained, and can be used to determine whether or not two categories are disjoint.
-
-
Constructor Summary
Constructors Constructor Description Category(java.lang.String label, java.util.function.IntPredicate predicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntSetgetIntSet()Get 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)
-
-
-
Method Detail
-
test
public boolean test(int value)
- Specified by:
testin interfacejava.util.function.IntPredicate
-
isDisjoint
public boolean isDisjoint(CharacterClass other)
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
-
getIntSet
public IntSet getIntSet()
Description copied from interface:CharacterClassGet the set of matching characters if available. If not available, return null- Specified by:
getIntSetin interfaceCharacterClass
-
-