Class SingletonCharacterClass

java.lang.Object
net.sf.saxon.regex.charclass.SingletonCharacterClass
All Implemented Interfaces:
IntPredicate, CharacterClass, IntPredicateProxy

public class SingletonCharacterClass extends Object implements CharacterClass
A character class represents a set of characters for regex matching purposes. A singleton character class matches exactly one character
  • Constructor Details

    • SingletonCharacterClass

      public SingletonCharacterClass(int codepoint)
  • Method Details

    • test

      public boolean test(int value)
      Description copied from interface: CharacterClass
      Test whether a particular codepoint is a member of the character class
      Specified by:
      test in interface CharacterClass
      Specified by:
      test in interface IntPredicate
      Specified by:
      test in interface IntPredicateProxy
      Parameters:
      value - the codepoint to be tested
      Returns:
      true if it matches
    • isDisjoint

      public boolean isDisjoint(CharacterClass other)
      Description copied from interface: CharacterClass
      Ask 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:
      isDisjoint in interface CharacterClass
      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

      public IntSet getIntSet()
      Description copied from interface: CharacterClass
      Get the set of matching characters if available. If not available, return null
      Specified by:
      getIntSet in interface CharacterClass