Skip to content

Commit 6a6fe20

Browse files
committed
Update README.md
1 parent 964806e commit 6a6fe20

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@
179179
##Memento
180180
**Intent:** Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later.
181181

182+
![alt text](https://github.com/iluwatar/java-design-patterns/blob/master/memento/etc/memento.jpg "Memento")
183+
184+
**Applicability:** Use the Memento pattern when
185+
* a snapshot of an object's state must be saved so that it can be restored to that state later, and
186+
* a direct interface to obtaining the state would expose implementation details and break the object's encapsulation
187+
182188
##Observer
183189
**Intent:** Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
184190

0 commit comments

Comments
 (0)