Class SimpleStateIndex<T>
java.lang.Object
com.oracle.truffle.regex.tregex.automaton.SimpleStateIndex<T>
- All Implemented Interfaces:
StateIndex<T>,Iterable<T>
- Direct Known Subclasses:
GlobalSubTreeIndex,GroupsWithGuardsIndex,SubTreeIndex
Simple base class for implementors of
StateIndex.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidget(int i) intintgetState(int id) protected abstract intgetStateId(T state) iterator()protected abstract voidsetStateId(T state, int id) intsize()stream()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.oracle.truffle.regex.tregex.automaton.StateIndex
isEmpty
-
Constructor Details
-
SimpleStateIndex
protected SimpleStateIndex() -
SimpleStateIndex
protected SimpleStateIndex(int size)
-
-
Method Details
-
add
-
getStateId
-
setStateId
-
getNumberOfStates
public int getNumberOfStates()- Specified by:
getNumberOfStatesin interfaceStateIndex<T>
-
getId
- Specified by:
getIdin interfaceStateIndex<T>
-
getState
- Specified by:
getStatein interfaceStateIndex<T>
-
getEmptySet
-
size
public int size() -
get
-
iterator
-
spliterator
- Specified by:
spliteratorin interfaceIterable<T>
-
stream
-