Class IntSetCharacterClass

  • All Implemented Interfaces:
    java.util.function.IntPredicate, CharacterClass

    public class IntSetCharacterClass
    extends java.lang.Object
    implements CharacterClass
    A character class represents a set of characters for regex matching purposes. An IntSetCharacterClass is a character class represented by a set of integer codepoints
    • Method Summary

      All Methods Instance Methods Concrete 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).
      boolean test​(int value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.IntPredicate

        and, negate, or
    • Constructor Detail

      • IntSetCharacterClass

        public IntSetCharacterClass​(IntSet intSet)
    • Method Detail

      • 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
      • test

        public boolean test​(int value)
        Specified by:
        test in interface java.util.function.IntPredicate
      • isDisjoint

        public 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.
        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