next

fun next(transition: Transition, label: Int): Int

Looks for the next transition that matches the provided label, assuming determinism.

This method is similar to .step but is used more efficiently when iterating over multiple transitions from the same source state. It keeps the latest reached transition index in transition.transitionUpto so the next call to this method can continue from there instead of restarting from the first transition.

Return

The destination state; or -1 if no matching outgoing transition.

Parameters

transition

The transition to start the lookup from (inclusive, using its and Transition.transitionUpto). It is updated with the matched transition; or with Transition.dest = -1 if no match.

label

The codepoint to look up.