Multiton pattern: Difference between revisions

Content deleted Content added
FrescoBot (talk | contribs)
m Bot: link syntax and minor changes
m Fix a little grammar issue
Line 1:
{{Plain image with caption|Image:Multiton.svg|UML diagram of the multiton}}
In [[software engineering]], the '''multiton pattern''' is a [[design pattern (computer science)|design pattern]] which generalizes the [[singleton pattern]]. Whereas the [[singleton pattern | singleton]] allows only one instance of a class to be created, the multiton pattern allows for the controlled creation of multiple instances, which it manages through the use of a [[associative array|map]].
 
Rather than having a single instance ''per application'' (e.g. the {{Javadoc:SE|package=java.lang|java/lang|Runtime}} object in the [[Java (programming language)|Java programming language]]) the multiton pattern instead ensures a single instance ''per key''.