Added Private Class Data pattern description to README.md.

This commit is contained in:
Ilkka Seppälä 2015-05-23 16:41:10 +03:00
parent a2841c8954
commit ed074b7881

View File

@ -40,6 +40,7 @@ Structural patterns are concerned with how classes and objects are composed to f
* [Service Locator](#service-locator)
* [Servant](#servant)
* [Event Aggregator](#event-aggregator)
* [Private Class Data](#private-class-data)
### Behavioral Patterns
@ -610,6 +611,14 @@ validation and for building to order
**Applicability:** Use the Thread Pool pattern when
* You have a large number of short-lived tasks to be executed in parallel
## <a name="private-class-data">Private Class Data</a> [&#8593;](#list-of-design-patterns)
**Intent:** Private Class Data design pattern seeks to reduce exposure of attributes by limiting their visibility. It reduces the number of class attributes by encapsulating them in single Data object.
![alt text](https://github.com/iluwatar/java-design-patterns/blob/master/private-class-data/etc/private-class-data.png "Private Class Data")
**Applicability:** Use the Private Class Data pattern when
* You want to prevent write access to class data members
# Frequently asked questions