Added real world example for Singleton.

This commit is contained in:
Ilkka Seppälä 2015-02-25 15:52:32 +02:00
parent 69e9fb1f5a
commit e30dcbe9e1

View File

@ -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> [&#8593;](#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.