JFlex
Class StateSet

java.lang.Object
  extended byJFlex.StateSet

public final class StateSet
extends java.lang.Object

A set of NFA states (= integers). Very similar to java.util.BitSet, but is faster and doesn't crash


Field Summary
static StateSet EMPTY
           
 
Constructor Summary
StateSet()
           
StateSet(int state)
           
StateSet(StateSet set)
           
 
Method Summary
 boolean add(StateSet set)
           
 void addState(int state)
           
 void clear()
           
 StateSet complement(StateSet set)
          Returns the set of elements that contained are in the specified set but are not contained in this set.
 boolean containsElements()
           
 boolean containsSet(StateSet set)
           
 StateSet copy()
           
 boolean equals(java.lang.Object b)
           
 int getAndRemoveElement()
          Returns one element of the set and removes it.
 int hashCode()
           
 boolean isElement(int state)
           
 void remove(int state)
           
 StateSetEnumerator states()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final StateSet EMPTY
Constructor Detail

StateSet

public StateSet()

StateSet

public StateSet(int state)

StateSet

public StateSet(StateSet set)
Method Detail

addState

public void addState(int state)

clear

public void clear()

isElement

public boolean isElement(int state)

getAndRemoveElement

public int getAndRemoveElement()
Returns one element of the set and removes it. Precondition: the set is not empty.


remove

public void remove(int state)

complement

public StateSet complement(StateSet set)
Returns the set of elements that contained are in the specified set but are not contained in this set.


add

public boolean add(StateSet set)

containsSet

public boolean containsSet(StateSet set)

equals

public boolean equals(java.lang.Object b)
Throws:
java.lang.ClassCastException - if b is not a StateSet
java.lang.NullPointerException - if b is null

hashCode

public int hashCode()

states

public StateSetEnumerator states()

containsElements

public boolean containsElements()

copy

public StateSet copy()

toString

public java.lang.String toString()