Improved encapsulation of the Memento pattern by moving the
StarMementoInternal class to inner class of Star.
This commit is contained in:
@ -353,7 +353,7 @@ A programming idiom is a means of expressing a recurring construct in one or mor
|
||||
## <a name="memento">Memento</a> [↑](#list-of-design-patterns)
|
||||
**Intent:** Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later.
|
||||
|
||||

|
||||

|
||||
|
||||
**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
|
||||
|
Reference in New Issue
Block a user