JFlex
Class 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
StateSet
public StateSet()
StateSet
public StateSet(int size)
StateSet
public StateSet(int size,
int state)
addState
public void addState(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.
containsElements
public boolean containsElements()
containsSet
public boolean containsSet(StateSet set)
copy
public void copy(StateSet set)
Copy specified StateSet into this.
set
- the state set to copy.
equals
public boolean equals(Object b)
getAndRemoveElement
public int getAndRemoveElement()
Returns one element of the set and removes it.
Precondition: the set is not empty.
hashCode
public int hashCode()
isElement
public boolean isElement(int state)
remove
public void remove(int state)
toString
public String toString()