public State next() {
        if (this == STOPPED) {
            throw new NoSuchElementException();
        }
        return values()[ordinal() + 1];
    }
Returns the next state.

@return the next state
@throws java.util.NoSuchElementException if there are no next state
common-parent/injector/src/main/java/com/speedment/common/injector/State.java