mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-08-11 02:22:34 +00:00
docs: diagrams for callback, circuit breaker, client session, collecting parameter, colletion pipeline, combinator, command, commander, component, composite entity, composite view, composite, context object, converter, crtp, currying
This commit is contained in:
@@ -34,6 +34,10 @@ Wikipedia says
|
||||
|
||||
> In software engineering, the composite pattern is a partitioning design pattern. The composite pattern describes that a group of objects is to be treated in the same way as a single instance of an object. The intent of a composite is to "compose" objects into tree structures to represent part-whole hierarchies. Implementing the composite pattern lets clients treat individual objects and compositions uniformly.
|
||||
|
||||
Flowchart
|
||||
|
||||

|
||||
|
||||
## Programmatic Example of Composite Pattern in Java
|
||||
|
||||
Every sentence is composed of words which are in turn composed of characters. Each of these objects are printable, and they can have something printed before or after them like sentence always ends with full stop and word always has space before it.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
Reference in New Issue
Block a user