Package org.apache.lucene.util.automaton
Class RunAutomaton
- java.lang.Object
-
- org.apache.lucene.util.automaton.RunAutomaton
-
- Direct Known Subclasses:
ByteRunAutomaton,CharacterRunAutomaton
public abstract class RunAutomaton extends java.lang.ObjectFinite-state automaton with fast run operation.
-
-
Constructor Summary
Constructors Constructor Description RunAutomaton(Automaton a, int maxInterval, boolean tableize)Constructs a newRunAutomatonfrom a deterministicAutomaton.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)int[]getCharIntervals()Returns array of codepoint class interval start points.intgetInitialState()Returns initial state.intgetSize()Returns number of states in automaton.inthashCode()booleanisAccept(int state)Returns acceptance status for given state.intstep(int state, int c)Returns the state obtained by reading the given char from the given state.java.lang.StringtoString()Returns a string representation of this automaton.
-
-
-
Constructor Detail
-
RunAutomaton
public RunAutomaton(Automaton a, int maxInterval, boolean tableize)
Constructs a newRunAutomatonfrom a deterministicAutomaton.- Parameters:
a- an automaton
-
-
Method Detail
-
toString
public java.lang.String toString()
Returns a string representation of this automaton.- Overrides:
toStringin classjava.lang.Object
-
getSize
public final int getSize()
Returns number of states in automaton.
-
isAccept
public final boolean isAccept(int state)
Returns acceptance status for given state.
-
getInitialState
public final int getInitialState()
Returns initial state.
-
getCharIntervals
public final int[] getCharIntervals()
Returns array of codepoint class interval start points. The array should not be modified by the caller.
-
step
public final int step(int state, int c)Returns the state obtained by reading the given char from the given state. Returns -1 if not obtaining any such state. (If the originalAutomatonhad no dead states, -1 is returned here if and only if a dead state is entered in an equivalent automaton with a total transition function.)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-