Design Patterns Java™ Workbook

(Michael S) #1
Appendix B. Solutions

SOLUTION 24.6....................................................................................................................................


The intent of the MEMENTO pattern is to provide storage and restoration of an object's state.
Typically, you can add a new memento to a stack with each execution of a command, popping
and reapplying these mementos when a user needs to undo commands.

Free download pdf