From ed074b788181d976581c06c198586847e615cee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Sat, 23 May 2015 16:41:10 +0300 Subject: [PATCH] Added Private Class Data pattern description to README.md. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 61682aaa1..69bfb2541 100644 --- a/README.md +++ b/README.md @@ -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 +## Private Class Data [↑](#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