+1

Memento: State Encapsulation.

Torky il y a 1 an 0
Instead of having the Memento and the Object coupled on private attributes being declared in both classes (State). We can encapsulate these elements in a State object with a known interface, hence different states can be used and classes are less coupled.