Class State
Inheritance
Inherited Members
Namespace: Lucene.Net.Util.Automaton
Assembly: Lucene.Net.dll
Syntax
public class State : IComparable<State>, IEquatable<State>
  Constructors
| Improve this Doc View SourceState()
Constructs a new state. Initially, the new state is a reject state.
Declaration
public State()
  Properties
| Improve this Doc View SourceAccept
Sets acceptance for this state. If true, this state is an accept state.
Declaration
public virtual bool Accept { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Number
Return this state's number.
Expert: Will be useless unless GetNumberedStates() has been called first to number the states.
Declaration
public virtual int Number { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Int32 | The number.  | 
      
NumTransitions
Declaration
public virtual int NumTransitions { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
TransitionsArray
Declaration
public Transition[] TransitionsArray { get; }
  Property Value
| Type | Description | 
|---|---|
| Transition[] | 
Methods
| Improve this Doc View SourceAddTransition(Transition)
Adds an outgoing transition.
Declaration
public virtual void AddTransition(Transition t)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Transition | t | Transition.  | 
      
CompareTo(State)
Compares this object with the specified object for order. States are ordered by the time of construction.
Declaration
public virtual int CompareTo(State s)
  Parameters
| Type | Name | Description | 
|---|---|---|
| State | s | 
Returns
| Type | Description | 
|---|---|
| System.Int32 | 
Equals(State)
Declaration
public bool Equals(State other)
  Parameters
| Type | Name | Description | 
|---|---|---|
| State | other | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
GetHashCode()
Declaration
public override int GetHashCode()
  Returns
| Type | Description | 
|---|---|
| System.Int32 | 
Overrides
GetTransitions()
Returns the set of outgoing transitions. Subsequent changes are reflected in the automaton.
Declaration
public virtual IEnumerable<Transition> GetTransitions()
  Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<Transition> | Transition set.  | 
      
Reduce()
Reduces this state. A state is "reduced" by combining overlapping and adjacent edge intervals with same destination.
Declaration
public virtual void Reduce()
  SetTransitions(Transition[])
Declaration
public virtual void SetTransitions(Transition[] transitions)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Transition[] | transitions | 
SortTransitions(IComparer<Transition>)
Returns sorted list of outgoing transitions.
Declaration
public virtual void SortTransitions(IComparer<Transition> comparer)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Collections.Generic.IComparer<Transition> | comparer | Comparer to sort with.  | 
      
Step(Int32)
Performs lookup in transitions, assuming determinism.
Declaration
public virtual State Step(int c)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | c | Codepoint to look up.  | 
      
Returns
| Type | Description | 
|---|---|
| State | Destination state,   | 
      
See Also
| Improve this Doc View SourceStep(Int32, ICollection<State>)
Performs lookup in transitions, allowing nondeterminism.
Declaration
public virtual void Step(int c, ICollection<State> dest)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | c | Codepoint to look up.  | 
      
| System.Collections.Generic.ICollection<State> | dest | Collection where destination states are stored.  | 
      
See Also
| Improve this Doc View SourceToString()
Returns string describing this state. Normally invoked via ToString().
Declaration
public override string ToString()
  Returns
| Type | Description | 
|---|---|
| System.String | 
Overrides
TrimTransitionsArray()
Downsizes transitionArray to numTransitions.
Declaration
public virtual void TrimTransitionsArray()