Skip to content

Commit 599e6cd

Browse files
committed
Added real world example for Flyweight.
1 parent 093fc1f commit 599e6cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@
178178
* many groups of objects may be replaced by relatively few shared objects once extrinsic state is removed
179179
* the application doesn't depend on object identity. Since flyweight objects may be shared, identity tests will return true for conceptually distinct objects.
180180

181+
**Real world examples:**
182+
* [java.lang.Integer#valueOf(int)](http://docs.oracle.com/javase/6/docs/api/java/lang/Integer.html#valueOf%28int%29)
183+
181184
## <a name="proxy">Proxy</a> [&#8593;](#list-of-design-patterns)
182185
**Intent:** Provide a surrogate or placeholder for another object to control access to it.
183186

0 commit comments

Comments
 (0)