Multiton Pattern

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:

    Swift while the woof is whole,
    turn now my spirit, swift,
    and tear the pattern there,
    the flowers so deftly wrought,
    the border of sea-blue,
    the sea-blue coast of home.
    Hilda Doolittle (1886–1961)