threadIterator = threads.values().iterator(); index = 1;
reset();
    public DebugState process(KeyboardEvent event) {        DebugState newState = this;        switch (event.getKeyChar()) {        case 'n':            if (threadIterator.hasNext()) {                final Thread t = (Thread) threadIterator.next();                newState = new ThreadState(this, t, index++);            }            break;        case 'r':            threadIterator = threads.values().iterator();            index = 1;            break;        default:            return this;        }        event.consume();        return newState;    }