Multiton pattern: Difference between revisions

Content deleted Content added
Changing short description from "Design pattern, similar to the singleton, but allowing more than one instance of a class to be created" to "Software engineering design pattern" (Shortdesc helper)
sources for GoF, can't find a source that says "registry of singletons" is actually the same pattern though
Line 5:
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''.
 
MostThe people and textbooks consider this a singletonmultiton pattern{{Citation needed|date=April 2012}}. For example, multiton does not explicitly appear as a pattern in the highly regarded [[object-oriented programming]] textbook ''[[Design Patterns (book)|Design Patterns]]''.<ref>{{cite (itbook appears|last1=O'Docherty as|first1=Mike a|title=Object-oriented moreanalysis flexibleand approachdesign: namedunderstanding system development with UML 2.0 |date=2005 |publisher=Wiley |___location=Chichester |isbn=0470092408 |page=341}}</ref> However, the book describes using a '''registry of singletons''') to allow subclassing of singletons,<ref>{{cite book |title=Design patterns: elements of reusable object-oriented software |date=2011 |publisher=Addison-Wesley |___location=Boston, Mass. Munich |isbn=0-201-63361-2 |page=130}}</ref> which is essentially the multiton pattern.{{Citation needed|date=April 2012}}
 
==Description==