Memento Pattern

We use this pattern when we expect the need to restore an object to a previous state (undo option) or we expect any other reason for recalling the previous state of the object (used a reminder or reference of how something should look).

Bricks:
Memento class: object representing the state
Originator class: creates/stores states in Memento objects
Caretaker class: responsible for restoring objects state from Memento (keeping a list of all previously saved states)

Last update 01.08.2019.
For possible mistakes in content or typos, I apologise and kindly ask you to report here.