mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-23 02:25:26 +00:00
fdb9be1e76
This makes cleaner URLs thanks to jekyll
697 B
697 B
layout, title, folder, permalink, categories, tags
| layout | title | folder | permalink | categories | tags |
|---|---|---|---|---|---|
| pattern | Memento | memento | /patterns/memento/ | pattern_cat | pattern_tag |
Intent: Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later.
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:
