Skip to content
Branch: master
Find file History
Pull request Compare This branch is 252 commits behind iluwatar:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
etc
src
README.md
pom.xml

README.md

layout title folder permalink categories tags
pattern
Memento
memento
/patterns/memento/
Behavioral
Java
Gang Of Four
Difficulty-Intermediate

Also known as

Token

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

Credits

You can’t perform that action at this time.