mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-14 20:17:21 +00:00
Added real world example for Observer.
This commit is contained in:
1 parent
d94cb0e243
commit
420491429f
1 file changed
+2
@@ -310,6 +310,8 @@
|
|||||||
|
|
||||||
* changing in one object leads to a change in other objects
|
* changing in one object leads to a change in other objects
|
||||||
|
|
||||||
|
**Real world examples:**
|
||||||
|
* [java.util.Observer](http://docs.oracle.com/javase/6/docs/api/java/util/Observer.html)
|
||||||
|
|
||||||
## <a name="state">State</a> [↑](#list-of-design-patterns)
|
## <a name="state">State</a> [↑](#list-of-design-patterns)
|
||||||
**Intent:** Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.
|
**Intent:** Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.
|
||||||
|
|||||||
Reference in new issue
Block a user