Module org.apache.lucene.core
Package org.apache.lucene.util.automaton
Class DaciukMihovAutomatonBuilder.State
java.lang.Object
org.apache.lucene.util.automaton.DaciukMihovAutomatonBuilder.State
- Enclosing class:
DaciukMihovAutomatonBuilder
DFSA state with
char
labels on transitions.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
true
if this state corresponds to the end of at least one input sequence.(package private) int[]
Labels of outgoing transitions.private static final int[]
An empty set of labels.private static final DaciukMihovAutomatonBuilder.State[]
An empty set of states.(package private) DaciukMihovAutomatonBuilder.State[]
States reachable from outgoing transitions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Two states are equal if: they have an identical number of outgoing transitions, labeled with the same labels corresponding outgoing transitions lead to the same states (to states with an identical right-language).(package private) DaciukMihovAutomatonBuilder.State
getState
(int label) Returns the target state of a transition leaving this state and labeled withlabel
.(package private) boolean
Returntrue
if this state has any children (outgoing transitions).int
hashCode()
Compute the hash code of the current status of this state.(package private) DaciukMihovAutomatonBuilder.State
Return the most recent transitions's target state.(package private) DaciukMihovAutomatonBuilder.State
lastChild
(int label) Return the associated state if the most recent transition is labeled withlabel
.(package private) DaciukMihovAutomatonBuilder.State
newState
(int label) Create a new outgoing transition labeledlabel
and return the newly created target state for this transition.private static boolean
referenceEquals
(Object[] a1, Object[] a2) Compare two lists of objects for reference-equality.(package private) void
Replace the last added outgoing transition's target state with the given state.
-
Field Details
-
NO_LABELS
private static final int[] NO_LABELSAn empty set of labels. -
NO_STATES
An empty set of states. -
labels
int[] labelsLabels of outgoing transitions. Indexed identically tostates
. Labels must be sorted lexicographically. -
states
DaciukMihovAutomatonBuilder.State[] statesStates reachable from outgoing transitions. Indexed identically tolabels
. -
is_final
boolean is_finaltrue
if this state corresponds to the end of at least one input sequence.
-
-
Constructor Details
-
State
private State()
-
-
Method Details
-
getState
Returns the target state of a transition leaving this state and labeled withlabel
. If no such transition exists, returnsnull
. -
equals
Two states are equal if:- they have an identical number of outgoing transitions, labeled with the same labels
- corresponding outgoing transitions lead to the same states (to states with an identical right-language).
-
hashCode
public int hashCode()Compute the hash code of the current status of this state. -
hasChildren
boolean hasChildren()Returntrue
if this state has any children (outgoing transitions). -
newState
Create a new outgoing transition labeledlabel
and return the newly created target state for this transition. -
lastChild
DaciukMihovAutomatonBuilder.State lastChild()Return the most recent transitions's target state. -
lastChild
Return the associated state if the most recent transition is labeled withlabel
. -
replaceLastChild
Replace the last added outgoing transition's target state with the given state. -
referenceEquals
Compare two lists of objects for reference-equality.
-