Skip to content

Commit 70e95e5

Browse files
committed
Updated README.md with Multiton pattern description.
1 parent 3ce1fde commit 70e95e5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Creational design patterns abstract the instantiation process. They help make a
2424
* [Prototype](#prototype)
2525
* [Property](#property)
2626
* [Singleton](#singleton)
27+
* [Multiton](#multiton)
2728

2829
### Structural Patterns
2930

@@ -583,6 +584,14 @@ validation and for building to order
583584
**Real world examples:**
584585
* [ObjectOutputStream](https://docs.oracle.com/javase/8/docs/api/java/io/ObjectOutputStream.html)
585586

587+
## <a name="multiton">Multiton</a> [&#8593;](#list-of-design-patterns)
588+
**Intent:** Ensure a class only has limited number of instances, and provide a global point of access to them.
589+
590+
![alt text](https://github.com/iluwatar/java-design-patterns/blob/master/multiton/etc/multiton.png "Multiton")
591+
592+
**Applicability:** Use the Multiton pattern when
593+
* there must be specific number of instances of a class, and they must be accessible to clients from a well-known access point
594+
586595

587596

588597
# Frequently asked questions

0 commit comments

Comments
 (0)