NUndoManager is a easy to use recorder of operations for undo and redo. You register an undo operation by registering a method to invoke to revert its state, the arguments for that method and the target of this method. NUndoManager is able to group all operations, so that performing an undo reverts all changes that occurred during the group. Also performed undo operations are saved for redo.