Skip to content

Files

Latest commit

7a7e891 · Sep 30, 2018

History

History
This branch is 2012 commits behind iluwatar/java-design-patterns:master.

multiton

layout title folder permalink categories tags
pattern
Multiton
multiton
/patterns/multiton/
Creational
Java
Difficulty-Beginner

Also known as

Registry

Intent

Ensure a class only has limited number of instances, and provide a global point of access to them.

alt text

Applicability

Use the Multiton pattern when

  • there must be specific number of instances of a class, and they must be accessible to clients from a well-known access point