Skip to content

Commit

Permalink
Added real world example for Flyweight.
Browse files Browse the repository at this point in the history
  • Loading branch information
iluwatar committed Feb 25, 2015
1 parent 093fc1f commit 599e6cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

## <a name="proxy">Proxy</a> [&#8593;](#list-of-design-patterns)
**Intent:** Provide a surrogate or placeholder for another object to control access to it.

Expand Down

0 comments on commit 599e6cd

Please sign in to comment.