<<< Iterator Summary | Index | Memento Structure >>> |
The Memento design pattern provides an ability to restore (rollback) an object to its previous state.
Problem to solve:
Consider an object of class Item has considerable hidden state information.
The client wants to:
remember checkpoint state
modify the state
optionally restore the state to the checkpoint state.
Minimal impact on the original Item class interface is preferred!
<<< Iterator Summary | Index | Memento Structure >>> |