This technique is used to capture an object's present state and store it in a way that allows it to be restored later without violating the encapsulation restrictions.
Examples of memento patterns include:
The classes, interfaces, and objects in the above UML class diagram are defined as follows.
The memento design pattern is important in the following scenarios: