Markus 5ce932ceb7 Work on #213
- properly categorize all patterns
- remove pattern list from readme
- minor fixes to readme
- removed "introduction" because its not a pattern and an error i
committed some time ago
2015-08-20 21:40:07 +02:00

689 B

layout, title, folder, permalink, categories, tags
layout title folder permalink categories tags
pattern Memento memento /patterns/memento/ Behavioral Java

Intent: Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later.

alt text

Applicability: Use the Memento pattern when

  • a snapshot of an object's state must be saved so that it can be restored to that state later, and
  • a direct interface to obtaining the state would expose implementation details and break the object's encapsulation

Real world examples: