From 69e9fb1f5a28220a394eed021f7daea62beafaf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Wed, 25 Feb 2015 15:50:39 +0200 Subject: [PATCH] Added real world example of Prototype. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 1c33d4c5a..8a41534c1 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,9 @@ * to avoid building a class hierarchy of factories that parallels the class hierarchy of products; or * when instances of a class can have one of only a few different combinations of state. It may be more convenient to install a corresponding number of prototypes and clone them rather than instantiating the class manually, each time with the appropriate state +**Real world examples:** +* [java.lang.Object#clone()](http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html#clone%28%29) + ## Singleton [↑](#list-of-design-patterns) **Intent:** Ensure a class only has one instance, and provide a global point of access to it.