public abstract class SimpleStateIndex<T> extends Object implements StateIndex<T>, Iterable<T>
StateIndex
.Modifier | Constructor and Description |
---|---|
protected |
SimpleStateIndex() |
protected |
SimpleStateIndex(int size) |
Modifier and Type | Method and Description |
---|---|
void |
add(T state) |
T |
get(int i) |
StateSet<SimpleStateIndex<T>,T> |
getEmptySet() |
int |
getId(T state) |
int |
getNumberOfStates() |
T |
getState(int id) |
protected abstract int |
getStateId(T state) |
Iterator<T> |
iterator() |
protected abstract void |
setStateId(T state,
int id) |
int |
size() |
Spliterator<T> |
spliterator() |
Stream<T> |
stream() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isEmpty
protected SimpleStateIndex()
protected SimpleStateIndex(int size)
public void add(T state)
protected abstract int getStateId(T state)
protected abstract void setStateId(T state, int id)
public int getNumberOfStates()
getNumberOfStates
in interface StateIndex<T>
public int getId(T state)
getId
in interface StateIndex<T>
public T getState(int id)
getState
in interface StateIndex<T>
public StateSet<SimpleStateIndex<T>,T> getEmptySet()
public int size()
public T get(int i)
public Spliterator<T> spliterator()
spliterator
in interface Iterable<T>