|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.util.automaton.State
public class State
Automaton state.
Field Summary | |
---|---|
int |
numTransitions
|
Transition[] |
transitionsArray
|
Constructor Summary | |
---|---|
State()
Constructs a new state. |
Method Summary | |
---|---|
void |
addTransition(Transition t)
Adds an outgoing transition. |
int |
compareTo(State s)
Compares this object with the specified object for order. |
int |
getNumber()
Return this state's number. |
Iterable<Transition> |
getTransitions()
Returns the set of outgoing transitions. |
int |
hashCode()
|
boolean |
isAccept()
Returns acceptance status. |
int |
numTransitions()
|
void |
reduce()
Reduces this state. |
void |
setAccept(boolean accept)
Sets acceptance for this state. |
void |
setTransitions(Transition[] transitions)
|
void |
sortTransitions(Comparator<Transition> comparator)
Sorts transitions array in-place. |
State |
step(int c)
Performs lookup in transitions, assuming determinism. |
void |
step(int c,
Collection<State> dest)
Performs lookup in transitions, allowing nondeterminism. |
String |
toString()
Returns string describing this state. |
void |
trimTransitionsArray()
Downsizes transitionArray to numTransitions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Transition[] transitionsArray
public int numTransitions
Constructor Detail |
---|
public State()
Method Detail |
---|
public Iterable<Transition> getTransitions()
public int numTransitions()
public void setTransitions(Transition[] transitions)
public void addTransition(Transition t)
t
- transitionpublic void setAccept(boolean accept)
accept
- if true, this state is an accept statepublic boolean isAccept()
public State step(int c)
c
- codepoint to look up
step(int, Collection)
public void step(int c, Collection<State> dest)
c
- codepoint to look updest
- collection where destination states are storedstep(int)
public void trimTransitionsArray()
public void reduce()
public void sortTransitions(Comparator<Transition> comparator)
public int getNumber()
Expert: Will be useless unless Automaton.getNumberedStates()
has been called first to number the states.
public String toString()
Automaton.toString()
.
toString
in class Object
public int compareTo(State s)
compareTo
in interface Comparable<State>
public int hashCode()
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |