mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-03 15:11:56 +00:00
Added real world example for Singleton.
This commit is contained in:
1 parent
69e9fb1f5a
commit
e30dcbe9e1
1 file changed
+3
@@ -104,6 +104,9 @@
|
||||
* managing a connection to a database
|
||||
* file manager
|
||||
|
||||
**Real world examples:**
|
||||
* [java.lang.Runtime#getRuntime()](http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#getRuntime%28%29)
|
||||
|
||||
## <a name="adapter">Adapter</a> [↑](#list-of-design-patterns)
|
||||
**Intent:** Convert the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.
|
||||
|
||||
|
||||
Reference in new issue
Block a user