In software engineering, the multiton pattern is a design pattern similar to the singleton, which allows only one instance of a class to be created. The multiton pattern expands on the singleton concept to manage a map of named instances as key-value pairs.
Rather than have a single instance per application (e.g. the java.lang.Runtime object in the Java programming language) the multiton pattern instead ensures a single instance per key.
Most people and textbooks consider this a singleton pattern. For example, multiton does not explicitly appear in the highly regarded object-oriented programming text book Design Patterns (it appears as a more flexible approach named registry of singletons).
Read more about Multiton Pattern: Clarification of Example Code, Drawbacks
Famous quotes containing the word pattern:
“Put out the light, and then put out the light.
If I quench thee, thou flaming minister,
I can again thy former light restore
Should I repent me; but once put out thy light,
Thou cunningst pattern of excelling nature,
I know not where is that Promethean heat
That can thy light relume.”
—William Shakespeare (15641616)