org.sc3d.apt.sss.v3
Class NDFA.State

java.lang.Object
  extended by org.sc3d.apt.sss.v3.NDFA.State
Enclosing class:
NDFA

public static class NDFA.State
extends java.lang.Object

Represents a state of an NDFA. Instances are not immutable: outgoing Transitions can be added using the 'add()' method.


Constructor Summary
NDFA.State()
          Constructs a State with no outgoing Transitions.
 
Method Summary
 void add(NDFA.Transition t)
          Adds an outgoing Transition to this State.
 int count()
          Returns the number of outgoing Transitions added to far.
 NDFA.Transition get(int index)
          Returns the outgoing Transition with index 'index'.
 NDFA.Transition[] toArray()
          Returns all the Transitions from this State in order of preference in a fresh array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NDFA.State

public NDFA.State()
Constructs a State with no outgoing Transitions.

Method Detail

count

public int count()
Returns the number of outgoing Transitions added to far.


get

public NDFA.Transition get(int index)
Returns the outgoing Transition with index 'index'. Transitions are numbered from '0' (most preferred) to 'count()-1' (least preferred).


toArray

public NDFA.Transition[] toArray()
Returns all the Transitions from this State in order of preference in a fresh array.


add

public void add(NDFA.Transition t)
Adds an outgoing Transition to this State.