Made changes according to feedback issue #258
This commit is contained in:
		@@ -14,7 +14,7 @@ tags: Java
 | 
			
		||||
**Applicability:** Use the Monostate pattern when
 | 
			
		||||
 | 
			
		||||
* The same state must be shared across all instances of a class.
 | 
			
		||||
* Typically this pattern might be used everywhere a SingleTon might be used. Singleton usage however is not transparent, Monostate usage is.
 | 
			
		||||
* Typically this pattern might be used everywhere a Singleton might be used. Singleton usage however is not transparent, Monostate usage is.
 | 
			
		||||
* Monostate has one major advantage over singleton. The subclasses might decorate the shared state as they wish and hence can provide dynamically different behaviour than the base class.
 | 
			
		||||
 | 
			
		||||
**Typical Use Case:**
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,6 @@ public class Request {
 | 
			
		||||
  public final String value;
 | 
			
		||||
 | 
			
		||||
  public Request(String value) {
 | 
			
		||||
    super();
 | 
			
		||||
    this.value = value;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user