JFlex

Class StateSet

public final class StateSet extends Object

A set of NFA states (= integers). Very similar to java.util.BitSet, but is faster and doesn't crash
Field Summary
static StateSetEMPTY
Constructor Summary
StateSet()
StateSet(int size)
StateSet(int size, int state)
StateSet(StateSet set)
Method Summary
voidadd(StateSet set)
voidaddState(int state)
voidclear()
StateSetcomplement(StateSet set)
Returns the set of elements that contained are in the specified set but are not contained in this set.
booleancontainsElements()
booleancontainsSet(StateSet set)
StateSetcopy()
voidcopy(StateSet set)
booleanequals(Object b)
intgetAndRemoveElement()
Returns one element of the set and removes it.
inthashCode()
booleanisElement(int state)
voidremove(int state)
StateSetEnumeratorstates()
StringtoString()

Field Detail

EMPTY

public static final StateSet EMPTY

Constructor Detail

StateSet

public StateSet()

StateSet

public StateSet(int size)

StateSet

public StateSet(int size, int state)

StateSet

public StateSet(StateSet set)

Method Detail

add

public void add(StateSet set)

addState

public void addState(int state)

clear

public void clear()

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 StateSet copy()

copy

public void copy(StateSet set)

equals

public boolean equals(Object b)

Throws: ClassCastException if b is not a StateSet NullPointerException if b is null

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)

states

public StateSetEnumerator states()

toString

public String toString()