Package net.sf.saxon.regex.charclass

## Interface CharacterClass

- All Superinterfaces:
    `java.util.function.IntPredicate`
  All Known Implementing Classes:
    `Categories.Category`, `EmptyCharacterClass`, `IntSetCharacterClass`, `InverseCharacterClass`, `PredicateCharacterClass`, `SingletonCharacterClass`

      public interface CharacterClass
      extends java.util.function.IntPredicate

  A character class represents a set of characters for regex matching purposes. It extends IntPredicate, so there is a mechanism for testing whether a particular codepoint is a member of the class. In addition it provides a method for testing whether two classes are disjoint, which is used when optimizing regular expressions.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `IntSet` | `getIntSet()` | Get the set of matching characters if available.
    `boolean` | `isDisjoint​(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).

    - ### Methods inherited from interface java.util.function.IntPredicate

      `and, negate, or, test`

- - ### Method Detail

    - #### isDisjoint

          boolean isDisjoint​(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). If in doubt, return false.
      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

          IntSet getIntSet()

      Get the set of matching characters if available. If not available, return null