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

Field Summary

static StateSet
EMPTY

Constructor Summary

StateSet()
StateSet(StateSet set)
StateSet(int size)
StateSet(int size, int state)

Method Summary

void
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()
void
copy(StateSet set)
boolean
equals(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()
String
toString()

Field Details

EMPTY

public static final StateSet EMPTY

Constructor Details

StateSet

public StateSet()

StateSet

public StateSet(StateSet set)

StateSet

public StateSet(int size)

StateSet

public StateSet(int size,
                int state)

Method Details

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)

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