public Command redoNext() {
        Command nextCommand;
        if (redoStack.size() > 0) {
            nextCommand = redoStack.pop();
        } else {
            // redo the last command that was done
            nextCommand = undoStack.pop();
            // put it again on the stack
            undoStack.push(nextCommand);
        }
        undoStack.push(nextCommand);
        nextCommand.redo();
        return nextCommand;
    }
public Command redoNext ( ) { Command nextCommand ; if ( redoStack . size ( ) > 0 ) { nextCommand = redoStack . pop ( ) ; } else { nextCommand = undoStack . pop ( ) ; undoStack . push ( nextCommand ) ; } undoStack . push ( nextCommand ) ; nextCommand . redo ( ) ; return nextCommand ; }
Pops the last command from the redo stack, puts it on the com.github.vatbub.common.core.undo stack and calls its {@link Command#redo()}-method. If no command is found on the redo stack,the last command from the undo stack is redone.

@return The command that was redone. <b>Its redo method was already called!</b>