Multiton pattern: Difference between revisions

Content deleted Content added
m top: plain image for readablity of SVG
Current phrasing was ambiguous. It made it sound as though the multiton itself was the design pattern which managed single instances, rather than the singleton.
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]] similarwhich togeneralizes the [[singleton pattern|singleton pattern]],. whichWhereas the [[singleton pattern | singleton]] allows only one instance of a class to be created., Thethe multiton pattern expandsallows onfor the singletoncontrolled conceptcreation toof multiple instances, which it manages through the manageuse a [[associative array|map]] of named instances as key-value pairs.
 
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''.