Automaton
Represents an automaton and all its states and transitions. States are integers and must be created using .createState. Mark a state as an accept state using .setAccept. Add transitions using .addTransition. Each state must have all of its transitions added at once; if this is too restrictive then use Automaton.Builder instead. State 0 is always the initial state. Once a state is finished, either because you've starting adding transitions to another state or you call .finishState, then that states transitions are sorted (first by min, then max, then dest) and reduced (transitions with adjacent labels going to the same dest are combined).
Types
Records new states and transitions and then .finish creates the Automaton. Use this when you cannot create the Automaton directly because it's too restrictive to have to add all transitions leaving each state at once.
Properties
Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).
True if no state has two transitions leaving with the same label.
Functions
Add a virtual epsilon transition between source and dest. Dest state must already have all transitions added because this method simply copies those same transitions over to source.
Add a new transition with min = max = label.
Add a new transition with the specified source, dest, min, max.
Create a new state.
Finishes the current state; call this once you are done adding transitions for a state. This is automatically called if you start adding transitions to a new source state, but for the last state you add you need to this method yourself.
Iterate to the next transition after the provided one
How many transitions this state has.
Returns sorted array of all interval start points.
Fill the provided Transition with the index'th transition leaving the specified state.
Initialize the provided Transition to iterate through all transitions leaving the specified state. You must call .getNextTransition to get each transition. Returns the number of transitions leaving this state.
Looks for the next transition that matches the provided label, assuming determinism.
Return the memory usage of this object in bytes. Negative values are illegal.