Added real world example for Singleton.
This commit is contained in:
parent
69e9fb1f5a
commit
e30dcbe9e1
@ -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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user