private static class GenerexIterator.Step extends Object
States.
It's responsible to keep the information of a State, like current char and transitions that need to be followed.
Also it adds (and removes) the characters while iterating over the characters (when the state has a range) and
transitions.
Implementation based on SpecialOperations.getFiniteStrings(Automaton,int), but in a non-recursive way to avoid
StackOverflowErrors.
State,
SpecialOperations.getFiniteStrings(dk.brics.automaton.Automaton,int)| Modifier and Type | Field and Description |
|---|---|
private char |
currentChar |
private dk.brics.automaton.Transition |
currentTransition |
private Iterator<dk.brics.automaton.Transition> |
iteratorTransitions |
| Constructor and Description |
|---|
GenerexIterator.Step(dk.brics.automaton.State state) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
build(StringBuilder stringBuilder,
Deque<GenerexIterator.Step> steps) |
private boolean |
hasCurrentTransition() |
private boolean |
moveToNextTransition() |
private void |
pushForDestinationOfCurrentTransition(Deque<GenerexIterator.Step> steps) |
private static void |
removeLastChar(StringBuilder stringBuilder) |
private Iterator<dk.brics.automaton.Transition> iteratorTransitions
private dk.brics.automaton.Transition currentTransition
private char currentChar
public boolean build(StringBuilder stringBuilder, Deque<GenerexIterator.Step> steps)
private boolean hasCurrentTransition()
private boolean moveToNextTransition()
private static void removeLastChar(StringBuilder stringBuilder)
private void pushForDestinationOfCurrentTransition(Deque<GenerexIterator.Step> steps)
Copyright © 2016. All rights reserved.