https://github.com/iluwatar/java-design-patterns-web/issues/8 Update pattern categories and tags
This commit is contained in:
@ -5,9 +5,7 @@ folder: singleton
|
||||
permalink: /patterns/singleton/
|
||||
categories: Creational
|
||||
tags:
|
||||
- Java
|
||||
- Gang Of Four
|
||||
- Difficulty-Beginner
|
||||
---
|
||||
|
||||
## Intent
|
||||
@ -54,14 +52,14 @@ assertEquals(enumIvoryTower1, enumIvoryTower2); // true
|
||||
## Applicability
|
||||
Use the Singleton pattern when
|
||||
|
||||
* there must be exactly one instance of a class, and it must be accessible to clients from a well-known access point
|
||||
* when the sole instance should be extensible by subclassing, and clients should be able to use an extended instance without modifying their code
|
||||
* There must be exactly one instance of a class, and it must be accessible to clients from a well-known access point
|
||||
* When the sole instance should be extensible by subclassing, and clients should be able to use an extended instance without modifying their code
|
||||
|
||||
## Typical Use Case
|
||||
|
||||
* the logging class
|
||||
* managing a connection to a database
|
||||
* file manager
|
||||
* The logging class
|
||||
* Managing a connection to a database
|
||||
* File manager
|
||||
|
||||
## Real world examples
|
||||
|
||||
|
Reference in New Issue
Block a user