Skip to content

Commit

Permalink
Added real world example for Factory Method.
Browse files Browse the repository at this point in the history
  • Loading branch information
iluwatar committed Feb 25, 2015
1 parent f22d4a3 commit 6bab9ed
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 @@ -74,6 +74,9 @@
* a class wants its subclasses to specify the objects it creates
* classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate

**Real world examples:**
* [java.util.Calendar#getInstance()](http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html#getInstance%28%29)

## <a name="prototype">Prototype</a> [&#8593;](#list-of-design-patterns)
**Intent:** Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.

Expand Down

0 comments on commit 6bab9ed

Please sign in to comment.