From 599e6cdeb22e49cccbbfdf5373d476df5fce5acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Wed, 25 Feb 2015 16:22:37 +0200 Subject: [PATCH] Added real world example for Flyweight. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 173ce66e1..c79d9fa50 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,9 @@ * many groups of objects may be replaced by relatively few shared objects once extrinsic state is removed * the application doesn't depend on object identity. Since flyweight objects may be shared, identity tests will return true for conceptually distinct objects. +**Real world examples:** +* [java.lang.Integer#valueOf(int)](http://docs.oracle.com/javase/6/docs/api/java/lang/Integer.html#valueOf%28int%29) + ## Proxy [↑](#list-of-design-patterns) **Intent:** Provide a surrogate or placeholder for another object to control access to it.