Package jflex

Class CharSet

java.lang.Object
jflex.CharSet

public final class CharSet extends Object
Character set.
Version:
JFlex 1.7.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) long[]
     
    (package private) static final int
     
    (package private) static final int
     
    private int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for CharSet.
    CharSet(int initialSize, int character)
    Constructor for CharSet.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(int character)
    Add the character to the set.
    Enumerates all characters.
    boolean
    Returns whether the set contains elements.
    boolean
    isElement(int character)
    Returns whether the character belongs to the set.
    private int
    nbits2size(int nbits)
     
    private void
    resize(int nbits)
     
    int
    Number of characters in the set.
    Returns a representation of this set.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • CharSet

      public CharSet()
      Constructor for CharSet.
    • CharSet

      public CharSet(int initialSize, int character)
      Constructor for CharSet.
      Parameters:
      initialSize - inital size.
      character - character.
  • Method Details

    • add

      public void add(int character)
      Add the character to the set.
      Parameters:
      character - character.
    • nbits2size

      private int nbits2size(int nbits)
    • resize

      private void resize(int nbits)
    • isElement

      public boolean isElement(int character)
      Returns whether the character belongs to the set.
      Parameters:
      character - character.
      Returns:
      whether the given character is an element of this set.
    • characters

      public CharSetEnumerator characters()
      Enumerates all characters.
      Returns:
      a CharSetEnumerator over all characters.
    • containsElements

      public boolean containsElements()
      Returns whether the set contains elements.
      Returns:
      whether the set is non-empty.
    • size

      public int size()
      Number of characters in the set.
      Returns:
      size of the size.
    • toString

      public String toString()
      Returns a representation of this set.
      Overrides:
      toString in class Object
      Returns:
      a String representation of this set.