Chapter 19. Memento

Sometimes, you want to create an object that existed previously. This occurs when you want to let a user undo operations, revert to an earlier version of work, or resume work that he or she previously suspended. The intent of the MEMENTO pattern is to provide storage and restoration of an object's state.

Get Design Patterns Java™ Workbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.