mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-12 20:15:47 +00:00
Improved encapsulation of the Memento pattern by moving the
StarMementoInternal class to inner class of Star.
This commit is contained in:
1 parent
72bc96f81b
commit
703ebd3e20
7 files changed
+142
-143
No files matched your search
@@ -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