private void generateElements(PrintStream out) {
        for (State state : repository.states()) {
            if(state.isStart()) {
                generateStartState(out, state);
            }
            else if(state.isEnd()) {
                generateEndState(out, state);
            }
            else {
                generateState(out, state);
            }
        }

        for (Transition transition : repository.transitions()) {
            generateEdge(out, transition);
        }
    }