JFlex
Class StateSet
java.lang.Object
JFlex.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
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
EMPTY
public static final StateSet EMPTY
StateSet
public StateSet()
StateSet
public StateSet(int state)
StateSet
public StateSet(StateSet set)
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()