Skip to content

Commit ed074b7

Browse files
committed
Added Private Class Data pattern description to README.md.
1 parent a2841c8 commit ed074b7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Structural patterns are concerned with how classes and objects are composed to f
4040
* [Service Locator](#service-locator)
4141
* [Servant](#servant)
4242
* [Event Aggregator](#event-aggregator)
43+
* [Private Class Data](#private-class-data)
4344

4445
### Behavioral Patterns
4546

@@ -610,6 +611,14 @@ validation and for building to order
610611
**Applicability:** Use the Thread Pool pattern when
611612
* You have a large number of short-lived tasks to be executed in parallel
612613

614+
## <a name="private-class-data">Private Class Data</a> [&#8593;](#list-of-design-patterns)
615+
**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.
616+
617+
![alt text](https://github.com/iluwatar/java-design-patterns/blob/master/private-class-data/etc/private-class-data.png "Private Class Data")
618+
619+
**Applicability:** Use the Private Class Data pattern when
620+
* You want to prevent write access to class data members
621+
613622

614623

615624
# Frequently asked questions

0 commit comments

Comments
 (0)