The Memento pattern is a behavioral GoF design pattern by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides that captures and externalizes an object's internal state without violating encapsulation, so that the object can be restored to this state later. Such snapshots are the basis for undo and other forms of state preservation.

GoF-Memento Pattern

Details
Full Name

GoF Memento Pattern (Behavioral)

Intent:

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