Compare commits
1 Commits
all-contri
...
caching-pa
Author | SHA1 | Date | |
---|---|---|---|
a8355988b2 |
.all-contributorsrc
.github/workflows
README.mdabstract-document
abstract-factory
active-object
acyclic-visitor
adapter
aggregator-microservices
ambassador
api-gateway
ar
arrange-act-assert
assets/flags
async-method-invocation
balking
bridge
builder
business-delegate
bytecode
caching
callback
chain
circuit-breaker
cloud-static-content-hosting
collection-pipeline
combinator
command
commander
composite-entity
composite
converter
cqrs
dao
data-bus
data-locality
data-mapper
data-transfer-object
decorator
delegation
dependency-injection
dirty-flag
double-buffer
double-checked-locking
double-dispatch
eip-aggregator
eip-message-channel
eip-publish-subscribe
eip-splitter
eip-wire-tap
event-aggregator
event-asynchronous
event-driven-architecture
event-queue
event-sourcing
execute-around
extension-objects
facade
factory-kit
factory-method
factory
feature-toggle
filterer
fluentinterface
flux
flyweight
fr
front-controller
game-loop
guarded-suspension
half-sync-half-async
hexagonal
intercepting-filter
interpreter
iterator
ko
layers
lazy-loading
leader-election
leader-followers
localization
es
fr
ko
strategy
zh
abstract-document
abstract-factory
active-object
acyclic-visitor
aggregator-microservices
ambassador
api-gateway
arrange-act-assert
async-method-invocation
balking
business-delegate
circuit-breaker
collection-pipeline
composite-entity
data-bus
data-mapper
double-checked-locking
factory-kit
factory
sharding
version-number
lockable-object
marker
master-worker-pattern
mediator
memento
model-view-controller
model-view-presenter
model-view-viewmodel
module
monad
monostate
multiton
mute-idiom
naked-objects
null-object
object-mother
object-pool
observer
page-object
parameter-object
partial-response
pipeline
poison-pill
pom.xmlpresentation
priority-queue
private-class-data
producer-consumer
promise
property
prototype
proxy
queue-load-leveling
reactor
reader-writer-lock
registry
repository
resource-acquisition-is-initialization
retry
role-object
saga
separated-interface
servant
serverless
service-layer
service-locator
sharding
singleton
spatial-partition
special-case
specification
state
step-builder
strangler
strategy
subclass-sandbox
table-module
template-method
thread-pool
throttling
tls
tolerant-reader
tr
trampoline
transaction-script
twin
typeobjectpattern
unit-of-work
update-method
value-object
version-number
visitor
zh
README.md
adapter
bridge
builder
caching
callback
chain
command
composite
converter
dao
data-transfer-object
decorator
delegation
dependency-injection
dirty-flag
facade
factory-method
interpreter
iterator
observer
private-class-data
producer-consumer
proxy
state
strategy
template-method
visitor
@ -1132,8 +1132,7 @@
|
|||||||
"profile": "http://subho.xyz",
|
"profile": "http://subho.xyz",
|
||||||
"contributions": [
|
"contributions": [
|
||||||
"code",
|
"code",
|
||||||
"review",
|
"review"
|
||||||
"maintenance"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1451,96 +1450,6 @@
|
|||||||
"review",
|
"review",
|
||||||
"code"
|
"code"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"login": "eas5",
|
|
||||||
"name": "Elvys Soares",
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/50836521?v=4",
|
|
||||||
"profile": "https://github.com/eas5",
|
|
||||||
"contributions": [
|
|
||||||
"code"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"login": "zWeBrain",
|
|
||||||
"name": "zWeBrain",
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/46642512?v=4",
|
|
||||||
"profile": "https://github.com/zWeBrain",
|
|
||||||
"contributions": [
|
|
||||||
"code"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"login": "Al-assad",
|
|
||||||
"name": "余林颖",
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/22493821?v=4",
|
|
||||||
"profile": "https://al-assad.github.io/notion/",
|
|
||||||
"contributions": [
|
|
||||||
"translation"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"login": "STudio26",
|
|
||||||
"name": "Alain",
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/6988911?v=4",
|
|
||||||
"profile": "https://github.com/STudio26",
|
|
||||||
"contributions": [
|
|
||||||
"translation"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"login": "DEV-VRUPER",
|
|
||||||
"name": "VR",
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/30525467?v=4",
|
|
||||||
"profile": "https://github.com/DEV-VRUPER",
|
|
||||||
"contributions": [
|
|
||||||
"doc"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"login": "JackieNim",
|
|
||||||
"name": "JackieNim",
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/4138836?v=4",
|
|
||||||
"profile": "https://github.com/JackieNim",
|
|
||||||
"contributions": [
|
|
||||||
"code"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"login": "EdisonE3",
|
|
||||||
"name": "EdisonE3",
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/52118917?v=4",
|
|
||||||
"profile": "https://github.com/EdisonE3",
|
|
||||||
"contributions": [
|
|
||||||
"code"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"login": "tao-sun2",
|
|
||||||
"name": "Tao",
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/66189688?v=4",
|
|
||||||
"profile": "https://github.com/tao-sun2",
|
|
||||||
"contributions": [
|
|
||||||
"code"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"login": "JuanManuelAbate",
|
|
||||||
"name": "Juan Manuel Abate",
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/16357060?v=4",
|
|
||||||
"profile": "https://github.com/JuanManuelAbate",
|
|
||||||
"contributions": [
|
|
||||||
"translation"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"login": "Xenilo137",
|
|
||||||
"name": "Xenilo137",
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/24865069?v=4",
|
|
||||||
"profile": "https://github.com/Xenilo137",
|
|
||||||
"contributions": [
|
|
||||||
"code"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"contributorsPerLine": 4,
|
"contributorsPerLine": 4,
|
||||||
|
9
.github/workflows/maven-ci.yml
vendored
9
.github/workflows/maven-ci.yml
vendored
@ -40,26 +40,25 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@master
|
||||||
with:
|
with:
|
||||||
# Disabling shallow clone for improving relevancy of SonarQube reporting
|
# Disabling shallow clone for improving relevancy of SonarQube reporting
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@master
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
java-version: 11
|
||||||
distribution: 'adopt'
|
|
||||||
|
|
||||||
- name: Cache SonarCloud packages
|
- name: Cache SonarCloud packages
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@master
|
||||||
with:
|
with:
|
||||||
path: ~/.sonar/cache
|
path: ~/.sonar/cache
|
||||||
key: ${{ runner.os }}-sonar
|
key: ${{ runner.os }}-sonar
|
||||||
restore-keys: ${{ runner.os }}-sonar
|
restore-keys: ${{ runner.os }}-sonar
|
||||||
|
|
||||||
- name: Cache Maven dependencies
|
- name: Cache Maven dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@master
|
||||||
with:
|
with:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||||
|
7
.github/workflows/maven-pr-builder.yml
vendored
7
.github/workflows/maven-pr-builder.yml
vendored
@ -38,16 +38,15 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@master
|
||||||
|
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@master
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
java-version: 11
|
||||||
distribution: 'adopt'
|
|
||||||
|
|
||||||
- name: Cache Maven Dependecies
|
- name: Cache Maven Dependecies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@master
|
||||||
with:
|
with:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||||
|
32
README.md
32
README.md
@ -6,16 +6,16 @@
|
|||||||
|
|
||||||

|

|
||||||
[](https://raw.githubusercontent.com/iluwatar/java-design-patterns/master/LICENSE.md)
|
[](https://raw.githubusercontent.com/iluwatar/java-design-patterns/master/LICENSE.md)
|
||||||
[](https://sonarcloud.io/dashboard?id=iluwatar_java-design-patterns)
|
[](https://sonarcloud.io/dashboard?id=iluwatar_java-design-patterns)
|
||||||
[](https://sonarcloud.io/dashboard?id=iluwatar_java-design-patterns)
|
[](https://sonarcloud.io/dashboard?id=iluwatar_java-design-patterns)
|
||||||
[](https://gitter.im/iluwatar/java-design-patterns?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/iluwatar/java-design-patterns?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||||
[](#contributors-)
|
[](#contributors-)
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
Read in different language : [**zh**](/localization/zh/README.md), [**ko**](/localization/ko/README.md), [**fr**](/localization/fr/README.md), [**tr**](/localization/tr/README.md), [**ar**](/localization/ar/README.md), [**es**](/localization/es/README.md)
|
Read in different language : [**CN**](/zh/README.md), [**KR**](/ko/README.md), [**FR**](/fr/README.md), [**TR**](/tr/README.md), [**AR**](/ar/README.md)
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ are familiar with the patterns.
|
|||||||
# Getting started
|
# Getting started
|
||||||
|
|
||||||
This site showcases Java Design Patterns. The solutions have been developed by
|
This site showcases Java Design Patterns. The solutions have been developed by
|
||||||
experienced programmers and architects from the open source community. The
|
experienced programmers and architects from the open source community. The
|
||||||
patterns can be browsed by their high level descriptions or by looking at their
|
patterns can be browsed by their high level descriptions or by looking at their
|
||||||
source code. The source code examples are well commented and can be thought as
|
source code. The source code examples are well commented and can be thought as
|
||||||
programming tutorials on how to implement a specific pattern. We use the most
|
programming tutorials on how to implement a specific pattern. We use the most
|
||||||
@ -49,7 +49,7 @@ patterns should only be introduced when they are needed for practical
|
|||||||
extensibility.
|
extensibility.
|
||||||
|
|
||||||
Once you are familiar with these concepts you can start drilling down into the
|
Once you are familiar with these concepts you can start drilling down into the
|
||||||
[available design patterns](https://java-design-patterns.com/patterns/) by any
|
[available design patterns](https://java-design-patterns.com/patterns/) by any
|
||||||
of the following approaches
|
of the following approaches
|
||||||
|
|
||||||
- Search for a specific pattern by name. Can't find one? Please report a new pattern [here](https://github.com/iluwatar/java-design-patterns/issues).
|
- Search for a specific pattern by name. Can't find one? Please report a new pattern [here](https://github.com/iluwatar/java-design-patterns/issues).
|
||||||
@ -61,8 +61,8 @@ in your architectures and have as much fun learning them as we had developing th
|
|||||||
|
|
||||||
# How to contribute
|
# How to contribute
|
||||||
|
|
||||||
If you are willing to contribute to the project you will find the relevant information in
|
If you are willing to contribute to the project you will find the relevant information in
|
||||||
our [developer wiki](https://github.com/iluwatar/java-design-patterns/wiki). We will help
|
our [developer wiki](https://github.com/iluwatar/java-design-patterns/wiki). We will help
|
||||||
you and answer your questions in the [Gitter chatroom](https://gitter.im/iluwatar/java-design-patterns).
|
you and answer your questions in the [Gitter chatroom](https://gitter.im/iluwatar/java-design-patterns).
|
||||||
|
|
||||||
# License
|
# License
|
||||||
@ -259,7 +259,7 @@ This project is licensed under the terms of the MIT license.
|
|||||||
<td align="center"><a href="https://www.linkedin.com/in/ashish-trivedi-218379135/"><img src="https://avatars3.githubusercontent.com/u/23194128?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ashish Trivedi</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ashishtrivedi16" title="Code">💻</a></td>
|
<td align="center"><a href="https://www.linkedin.com/in/ashish-trivedi-218379135/"><img src="https://avatars3.githubusercontent.com/u/23194128?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ashish Trivedi</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ashishtrivedi16" title="Code">💻</a></td>
|
||||||
<td align="center"><a href="https://rayyounghong.com"><img src="https://avatars1.githubusercontent.com/u/41055099?v=4?s=100" width="100px;" alt=""/><br /><sub><b>洪月阳</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=RayYH" title="Code">💻</a></td>
|
<td align="center"><a href="https://rayyounghong.com"><img src="https://avatars1.githubusercontent.com/u/41055099?v=4?s=100" width="100px;" alt=""/><br /><sub><b>洪月阳</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=RayYH" title="Code">💻</a></td>
|
||||||
<td align="center"><a href="https://xdvrx1.github.io/"><img src="https://avatars0.githubusercontent.com/u/47092464?v=4?s=100" width="100px;" alt=""/><br /><sub><b>xdvrx1</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Axdvrx1" title="Reviewed Pull Requests">👀</a> <a href="#ideas-xdvrx1" title="Ideas, Planning, & Feedback">🤔</a></td>
|
<td align="center"><a href="https://xdvrx1.github.io/"><img src="https://avatars0.githubusercontent.com/u/47092464?v=4?s=100" width="100px;" alt=""/><br /><sub><b>xdvrx1</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Axdvrx1" title="Reviewed Pull Requests">👀</a> <a href="#ideas-xdvrx1" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||||
<td align="center"><a href="http://subho.xyz"><img src="https://avatars0.githubusercontent.com/u/13291222?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Subhrodip Mohanta</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ohbus" title="Code">💻</a> <a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Aohbus" title="Reviewed Pull Requests">👀</a> <a href="#maintenance-ohbus" title="Maintenance">🚧</a></td>
|
<td align="center"><a href="http://subho.xyz"><img src="https://avatars0.githubusercontent.com/u/13291222?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Subhrodip Mohanta</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ohbus" title="Code">💻</a> <a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Aohbus" title="Reviewed Pull Requests">👀</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center"><a href="https://github.com/nahteb"><img src="https://avatars3.githubusercontent.com/u/13121570?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bethan Palmer</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=nahteb" title="Code">💻</a></td>
|
<td align="center"><a href="https://github.com/nahteb"><img src="https://avatars3.githubusercontent.com/u/13121570?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bethan Palmer</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=nahteb" title="Code">💻</a></td>
|
||||||
@ -313,22 +313,6 @@ This project is licensed under the terms of the MIT license.
|
|||||||
<td align="center"><a href="https://github.com/noamgrinch"><img src="https://avatars.githubusercontent.com/u/31648669?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Noam Greenshtain</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=noamgrinch" title="Code">💻</a></td>
|
<td align="center"><a href="https://github.com/noamgrinch"><img src="https://avatars.githubusercontent.com/u/31648669?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Noam Greenshtain</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=noamgrinch" title="Code">💻</a></td>
|
||||||
<td align="center"><a href="https://xuyonghong.cn/"><img src="https://avatars.githubusercontent.com/u/14086462?v=4?s=100" width="100px;" alt=""/><br /><sub><b>yonghong Xu</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=qfxl" title="Documentation">📖</a></td>
|
<td align="center"><a href="https://xuyonghong.cn/"><img src="https://avatars.githubusercontent.com/u/14086462?v=4?s=100" width="100px;" alt=""/><br /><sub><b>yonghong Xu</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=qfxl" title="Documentation">📖</a></td>
|
||||||
<td align="center"><a href="https://www.linkedin.com/in/jinisha-vora"><img src="https://avatars.githubusercontent.com/u/40777762?v=4?s=100" width="100px;" alt=""/><br /><sub><b>jinishavora</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Ajinishavora" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/iluwatar/java-design-patterns/commits?author=jinishavora" title="Code">💻</a></td>
|
<td align="center"><a href="https://www.linkedin.com/in/jinisha-vora"><img src="https://avatars.githubusercontent.com/u/40777762?v=4?s=100" width="100px;" alt=""/><br /><sub><b>jinishavora</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Ajinishavora" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/iluwatar/java-design-patterns/commits?author=jinishavora" title="Code">💻</a></td>
|
||||||
<td align="center"><a href="https://github.com/eas5"><img src="https://avatars.githubusercontent.com/u/50836521?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Elvys Soares</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=eas5" title="Code">💻</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center"><a href="https://github.com/zWeBrain"><img src="https://avatars.githubusercontent.com/u/46642512?v=4?s=100" width="100px;" alt=""/><br /><sub><b>zWeBrain</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=zWeBrain" title="Code">💻</a></td>
|
|
||||||
<td align="center"><a href="https://al-assad.github.io/notion/"><img src="https://avatars.githubusercontent.com/u/22493821?v=4?s=100" width="100px;" alt=""/><br /><sub><b>余林颖</b></sub></a><br /><a href="#translation-Al-assad" title="Translation">🌍</a></td>
|
|
||||||
<td align="center"><a href="https://github.com/STudio26"><img src="https://avatars.githubusercontent.com/u/6988911?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alain</b></sub></a><br /><a href="#translation-STudio26" title="Translation">🌍</a></td>
|
|
||||||
<td align="center"><a href="https://github.com/DEV-VRUPER"><img src="https://avatars.githubusercontent.com/u/30525467?v=4?s=100" width="100px;" alt=""/><br /><sub><b>VR</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=DEV-VRUPER" title="Documentation">📖</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center"><a href="https://github.com/JackieNim"><img src="https://avatars.githubusercontent.com/u/4138836?v=4?s=100" width="100px;" alt=""/><br /><sub><b>JackieNim</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=JackieNim" title="Code">💻</a></td>
|
|
||||||
<td align="center"><a href="https://github.com/EdisonE3"><img src="https://avatars.githubusercontent.com/u/52118917?v=4?s=100" width="100px;" alt=""/><br /><sub><b>EdisonE3</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=EdisonE3" title="Code">💻</a></td>
|
|
||||||
<td align="center"><a href="https://github.com/tao-sun2"><img src="https://avatars.githubusercontent.com/u/66189688?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tao</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=tao-sun2" title="Code">💻</a></td>
|
|
||||||
<td align="center"><a href="https://github.com/JuanManuelAbate"><img src="https://avatars.githubusercontent.com/u/16357060?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Juan Manuel Abate</b></sub></a><br /><a href="#translation-JuanManuelAbate" title="Translation">🌍</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center"><a href="https://github.com/Xenilo137"><img src="https://avatars.githubusercontent.com/u/24865069?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Xenilo137</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Xenilo137" title="Code">💻</a></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ title: Abstract Document
|
|||||||
folder: abstract-document
|
folder: abstract-document
|
||||||
permalink: /patterns/abstract-document/
|
permalink: /patterns/abstract-document/
|
||||||
categories: Structural
|
categories: Structural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Extensibility
|
- Extensibility
|
||||||
---
|
---
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>abstract-document</artifactId>
|
<artifactId>abstract-document</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Abstract Factory
|
|||||||
folder: abstract-factory
|
folder: abstract-factory
|
||||||
permalink: /patterns/abstract-factory/
|
permalink: /patterns/abstract-factory/
|
||||||
categories: Creational
|
categories: Creational
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Gang of Four
|
- Gang of Four
|
||||||
---
|
---
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>abstract-factory</artifactId>
|
<artifactId>abstract-factory</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Active Object
|
|||||||
folder: active-object
|
folder: active-object
|
||||||
permalink: /patterns/active-object/
|
permalink: /patterns/active-object/
|
||||||
categories: Concurrency
|
categories: Concurrency
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Performance
|
- Performance
|
||||||
---
|
---
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>active-object</artifactId>
|
<artifactId>active-object</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Acyclic Visitor
|
|||||||
folder: acyclic-visitor
|
folder: acyclic-visitor
|
||||||
permalink: /patterns/acyclic-visitor/
|
permalink: /patterns/acyclic-visitor/
|
||||||
categories: Behavioral
|
categories: Behavioral
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Extensibility
|
- Extensibility
|
||||||
---
|
---
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>acyclic-visitor</artifactId>
|
<artifactId>acyclic-visitor</artifactId>
|
||||||
|
@ -4,7 +4,6 @@ title: Adapter
|
|||||||
folder: adapter
|
folder: adapter
|
||||||
permalink: /patterns/adapter/
|
permalink: /patterns/adapter/
|
||||||
categories: Structural
|
categories: Structural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Gang of Four
|
- Gang of Four
|
||||||
---
|
---
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>adapter</artifactId>
|
<artifactId>adapter</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Aggregator Microservices
|
|||||||
folder: aggregator-microservices
|
folder: aggregator-microservices
|
||||||
permalink: /patterns/aggregator-microservices/
|
permalink: /patterns/aggregator-microservices/
|
||||||
categories: Architectural
|
categories: Architectural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Cloud distributed
|
- Cloud distributed
|
||||||
- Decoupling
|
- Decoupling
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>aggregator-microservices</artifactId>
|
<artifactId>aggregator-microservices</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>aggregator-service</artifactId>
|
<artifactId>aggregator-service</artifactId>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>aggregator-microservices</artifactId>
|
<artifactId>aggregator-microservices</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>aggregator-microservices</artifactId>
|
<artifactId>aggregator-microservices</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>inventory-microservice</artifactId>
|
<artifactId>inventory-microservice</artifactId>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>aggregator-microservices</artifactId>
|
<artifactId>aggregator-microservices</artifactId>
|
||||||
|
@ -4,7 +4,6 @@ title: Ambassador
|
|||||||
folder: ambassador
|
folder: ambassador
|
||||||
permalink: /patterns/ambassador/
|
permalink: /patterns/ambassador/
|
||||||
categories: Structural
|
categories: Structural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Decoupling
|
- Decoupling
|
||||||
- Cloud distributed
|
- Cloud distributed
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>ambassador</artifactId>
|
<artifactId>ambassador</artifactId>
|
||||||
|
@ -4,7 +4,6 @@ title: API Gateway
|
|||||||
folder: api-gateway
|
folder: api-gateway
|
||||||
permalink: /patterns/api-gateway/
|
permalink: /patterns/api-gateway/
|
||||||
categories: Architectural
|
categories: Architectural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Cloud distributed
|
- Cloud distributed
|
||||||
- Decoupling
|
- Decoupling
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>api-gateway</artifactId>
|
<artifactId>api-gateway</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>api-gateway-service</artifactId>
|
<artifactId>api-gateway-service</artifactId>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>api-gateway</artifactId>
|
<artifactId>api-gateway</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>image-microservice</artifactId>
|
<artifactId>image-microservice</artifactId>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>api-gateway</artifactId>
|
<artifactId>api-gateway</artifactId>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>api-gateway</artifactId>
|
<artifactId>api-gateway</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -4,7 +4,6 @@ title: Arrange/Act/Assert
|
|||||||
folder: arrange-act-assert
|
folder: arrange-act-assert
|
||||||
permalink: /patterns/arrange-act-assert/
|
permalink: /patterns/arrange-act-assert/
|
||||||
categories: Idiom
|
categories: Idiom
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Testing
|
- Testing
|
||||||
---
|
---
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
BIN
assets/flags/AR.png
Normal file
BIN
assets/flags/AR.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 252 B |
BIN
assets/flags/CN.png
Normal file
BIN
assets/flags/CN.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 310 B |
BIN
assets/flags/FR.png
Normal file
BIN
assets/flags/FR.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 100 B |
BIN
assets/flags/KR.png
Normal file
BIN
assets/flags/KR.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 413 B |
BIN
assets/flags/TR.png
Normal file
BIN
assets/flags/TR.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 802 B |
@ -4,7 +4,6 @@ title: Async Method Invocation
|
|||||||
folder: async-method-invocation
|
folder: async-method-invocation
|
||||||
permalink: /patterns/async-method-invocation/
|
permalink: /patterns/async-method-invocation/
|
||||||
categories: Concurrency
|
categories: Concurrency
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Reactive
|
- Reactive
|
||||||
---
|
---
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>async-method-invocation</artifactId>
|
<artifactId>async-method-invocation</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Balking
|
|||||||
folder: balking
|
folder: balking
|
||||||
permalink: /patterns/balking/
|
permalink: /patterns/balking/
|
||||||
categories: Concurrency
|
categories: Concurrency
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Decoupling
|
- Decoupling
|
||||||
---
|
---
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ title: Bridge
|
|||||||
folder: bridge
|
folder: bridge
|
||||||
permalink: /patterns/bridge/
|
permalink: /patterns/bridge/
|
||||||
categories: Structural
|
categories: Structural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Gang of Four
|
- Gang of Four
|
||||||
---
|
---
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>bridge</artifactId>
|
<artifactId>bridge</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -43,7 +43,7 @@ public class Hammer implements Weapon {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void swing() {
|
public void swing() {
|
||||||
LOGGER.info("The hammer is swung.");
|
LOGGER.info("The hammer is swinged.");
|
||||||
enchantment.apply();
|
enchantment.apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ public class Sword implements Weapon {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void swing() {
|
public void swing() {
|
||||||
LOGGER.info("The sword is swung.");
|
LOGGER.info("The sword is swinged.");
|
||||||
enchantment.apply();
|
enchantment.apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ title: Builder
|
|||||||
folder: builder
|
folder: builder
|
||||||
permalink: /patterns/builder/
|
permalink: /patterns/builder/
|
||||||
categories: Creational
|
categories: Creational
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Gang of Four
|
- Gang of Four
|
||||||
---
|
---
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>builder</artifactId>
|
<artifactId>builder</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Business Delegate
|
|||||||
folder: business-delegate
|
folder: business-delegate
|
||||||
permalink: /patterns/business-delegate/
|
permalink: /patterns/business-delegate/
|
||||||
categories: Structural
|
categories: Structural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Decoupling
|
- Decoupling
|
||||||
---
|
---
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>business-delegate</artifactId>
|
<artifactId>business-delegate</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Bytecode
|
|||||||
folder: bytecode
|
folder: bytecode
|
||||||
permalink: /patterns/bytecode/
|
permalink: /patterns/bytecode/
|
||||||
categories: Behavioral
|
categories: Behavioral
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Game programming
|
- Game programming
|
||||||
---
|
---
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ title: Caching
|
|||||||
folder: caching
|
folder: caching
|
||||||
permalink: /patterns/caching/
|
permalink: /patterns/caching/
|
||||||
categories: Behavioral
|
categories: Behavioral
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Performance
|
- Performance
|
||||||
- Cloud distributed
|
- Cloud distributed
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>caching</artifactId>
|
<artifactId>caching</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Callback
|
|||||||
folder: callback
|
folder: callback
|
||||||
permalink: /patterns/callback/
|
permalink: /patterns/callback/
|
||||||
categories: Idiom
|
categories: Idiom
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Reactive
|
- Reactive
|
||||||
---
|
---
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>callback</artifactId>
|
<artifactId>callback</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Chain of responsibility
|
|||||||
folder: chain
|
folder: chain
|
||||||
permalink: /patterns/chain/
|
permalink: /patterns/chain/
|
||||||
categories: Behavioral
|
categories: Behavioral
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Gang of Four
|
- Gang of Four
|
||||||
---
|
---
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>chain</artifactId>
|
<artifactId>chain</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Circuit Breaker
|
|||||||
folder: circuit-breaker
|
folder: circuit-breaker
|
||||||
permalink: /patterns/circuit-breaker/
|
permalink: /patterns/circuit-breaker/
|
||||||
categories: Behavioral
|
categories: Behavioral
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Performance
|
- Performance
|
||||||
- Decoupling
|
- Decoupling
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>circuit-breaker</artifactId>
|
<artifactId>circuit-breaker</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Static Content Hosting
|
|||||||
folder: cloud-static-content-hosting
|
folder: cloud-static-content-hosting
|
||||||
permalink: /patterns/cloud-static-content-hosting/
|
permalink: /patterns/cloud-static-content-hosting/
|
||||||
categories: Cloud
|
categories: Cloud
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Cloud distributed
|
- Cloud distributed
|
||||||
---
|
---
|
||||||
|
@ -4,7 +4,6 @@ title: Collection Pipeline
|
|||||||
folder: collection-pipeline
|
folder: collection-pipeline
|
||||||
permalink: /patterns/collection-pipeline/
|
permalink: /patterns/collection-pipeline/
|
||||||
categories: Functional
|
categories: Functional
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Reactive
|
- Reactive
|
||||||
---
|
---
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>collection-pipeline</artifactId>
|
<artifactId>collection-pipeline</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Combinator
|
|||||||
folder: combinator
|
folder: combinator
|
||||||
permalink: /patterns/combinator/
|
permalink: /patterns/combinator/
|
||||||
categories: Idiom
|
categories: Idiom
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Reactive
|
- Reactive
|
||||||
---
|
---
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>combinator</artifactId>
|
<artifactId>combinator</artifactId>
|
||||||
|
@ -4,7 +4,6 @@ title: Command
|
|||||||
folder: command
|
folder: command
|
||||||
permalink: /patterns/command/
|
permalink: /patterns/command/
|
||||||
categories: Behavioral
|
categories: Behavioral
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Gang of Four
|
- Gang of Four
|
||||||
---
|
---
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>command</artifactId>
|
<artifactId>command</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Commander
|
|||||||
folder: commander
|
folder: commander
|
||||||
permalink: /patterns/commander/
|
permalink: /patterns/commander/
|
||||||
categories: Concurrency
|
categories: Concurrency
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Cloud distributed
|
- Cloud distributed
|
||||||
---
|
---
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>commander</artifactId>
|
<artifactId>commander</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -1,123 +0,0 @@
|
|||||||
---
|
|
||||||
layout: pattern
|
|
||||||
title: Composite Entity
|
|
||||||
folder: composite-entity
|
|
||||||
permalink: /patterns/composite-entity/
|
|
||||||
categories: Structural
|
|
||||||
language: en
|
|
||||||
tags:
|
|
||||||
- Enterprise Integration Pattern
|
|
||||||
---
|
|
||||||
|
|
||||||
## Intent
|
|
||||||
|
|
||||||
It is used to model, represent, and manage a set of persistent objects that are interrelated, rather than representing them as individual fine-grained entities.
|
|
||||||
|
|
||||||
## Explanation
|
|
||||||
|
|
||||||
Real world example
|
|
||||||
|
|
||||||
> For a console, there may be many interfaces that need to be managed and controlled. Using the composite entity pattern, dependent objects such as messages and signals can be combined together and controlled using a single object.
|
|
||||||
|
|
||||||
In plain words
|
|
||||||
|
|
||||||
> Composite entity pattern allows a set of related objects to be represented and managed by a unified object.
|
|
||||||
|
|
||||||
**Programmatic Example**
|
|
||||||
|
|
||||||
We need a generic solution for the problem. To achieve this, let's introduce a generic
|
|
||||||
Composite Entity Pattern.
|
|
||||||
|
|
||||||
```java
|
|
||||||
public abstract class DependentObject<T> {
|
|
||||||
|
|
||||||
T data;
|
|
||||||
|
|
||||||
public void setData(T message) {
|
|
||||||
this.data = message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public T getData() {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract class CoarseGrainedObject<T> {
|
|
||||||
|
|
||||||
DependentObject<T>[] dependentObjects;
|
|
||||||
|
|
||||||
public void setData(T... data) {
|
|
||||||
IntStream.range(0, data.length).forEach(i -> dependentObjects[i].setData(data[i]));
|
|
||||||
}
|
|
||||||
|
|
||||||
public T[] getData() {
|
|
||||||
return (T[]) Arrays.stream(dependentObjects).map(DependentObject::getData).toArray();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
The specialized composite entity `console` inherit from this base class as follows.
|
|
||||||
|
|
||||||
```java
|
|
||||||
public class MessageDependentObject extends DependentObject<String> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SignalDependentObject extends DependentObject<String> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ConsoleCoarseGrainedObject extends CoarseGrainedObject<String> {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] getData() {
|
|
||||||
super.getData();
|
|
||||||
return new String[]{
|
|
||||||
dependentObjects[0].getData(), dependentObjects[1].getData()
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public void init() {
|
|
||||||
dependentObjects = new DependentObject[]{
|
|
||||||
new MessageDependentObject(), new SignalDependentObject()};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CompositeEntity {
|
|
||||||
|
|
||||||
private final ConsoleCoarseGrainedObject console = new ConsoleCoarseGrainedObject();
|
|
||||||
|
|
||||||
public void setData(String message, String signal) {
|
|
||||||
console.setData(message, signal);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] getData() {
|
|
||||||
return console.getData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Now managing the assignment of message and signal objects with the composite entity `console`.
|
|
||||||
|
|
||||||
```java
|
|
||||||
var console = new CompositeEntity();
|
|
||||||
console.init();
|
|
||||||
console.setData("No Danger", "Green Light");
|
|
||||||
Arrays.stream(console.getData()).forEach(LOGGER::info);
|
|
||||||
console.setData("Danger", "Red Light");
|
|
||||||
Arrays.stream(console.getData()).forEach(LOGGER::info);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Class diagram
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Applicability
|
|
||||||
|
|
||||||
Use the Composite Entity Pattern in the following situation:
|
|
||||||
|
|
||||||
* You want to manage multiple dependency objects through one object to adjust the degree of granularity between objects. At the same time, the lifetime of dependency objects depends on a coarse-grained object.
|
|
||||||
## Credits
|
|
||||||
|
|
||||||
* [Composite Entity Pattern in wikipedia](https://en.wikipedia.org/wiki/Composite_entity_pattern)
|
|
@ -1,45 +0,0 @@
|
|||||||
@startuml
|
|
||||||
package com.iluwatar.compositeentity {
|
|
||||||
class App {
|
|
||||||
+ App(message: String, signal: String)
|
|
||||||
+ main(args : String[]) {static}
|
|
||||||
}
|
|
||||||
class CompositeEntity{
|
|
||||||
- console : ConsoleCoarseGrainedObject
|
|
||||||
+ CompositeEntity()
|
|
||||||
+ setData(message: String, signal: String)
|
|
||||||
+ getData()
|
|
||||||
+ init()
|
|
||||||
}
|
|
||||||
abstract CoarseGrainedObject{
|
|
||||||
- dependentObjects : DependentObject[]
|
|
||||||
+ CoarseGrainedObject()
|
|
||||||
+ setData(data: T[])
|
|
||||||
+ getData()
|
|
||||||
}
|
|
||||||
abstract DependentObject{
|
|
||||||
- data : T
|
|
||||||
+ DependentObject()
|
|
||||||
+ setData(data: T)
|
|
||||||
+ getData()
|
|
||||||
}
|
|
||||||
class ConsoleCoarseGrainedObject{
|
|
||||||
+ ConsoleCoarseGrainedObject()
|
|
||||||
+ getData()
|
|
||||||
+ init()
|
|
||||||
}
|
|
||||||
class MessageDependentObject{
|
|
||||||
+ MessageDependentObject()
|
|
||||||
}
|
|
||||||
class SignalDependentObject{
|
|
||||||
+ SignalDependentObject()
|
|
||||||
}
|
|
||||||
|
|
||||||
MessageDependentObject --|> DependentObject
|
|
||||||
SignalDependentObject --|> DependentObject
|
|
||||||
ConsoleCoarseGrainedObject --|> CoarseGrainedObject
|
|
||||||
CompositeEntity -right-> ConsoleCoarseGrainedObject
|
|
||||||
CoarseGrainedObject "1" o--> "0.." DependentObject
|
|
||||||
App .right.> CompositeEntity
|
|
||||||
}
|
|
||||||
@enduml
|
|
Binary file not shown.
Before ![]() (image error) Size: 90 KiB |
@ -1,63 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!--
|
|
||||||
|
|
||||||
The MIT License
|
|
||||||
Copyright © 2014-2021 Ilkka Seppälä
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
-->
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<parent>
|
|
||||||
<artifactId>java-design-patterns</artifactId>
|
|
||||||
<groupId>com.iluwatar</groupId>
|
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<artifactId>composite-entity</artifactId>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.junit.jupiter</groupId>
|
|
||||||
<artifactId>junit-jupiter-engine</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifest>
|
|
||||||
<mainClass>com.iluwatar.composite-entity.com.iluwatar.compositeentity.App</mainClass>
|
|
||||||
</manifest>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
@ -1,61 +0,0 @@
|
|||||||
/*
|
|
||||||
* The MIT License
|
|
||||||
* Copyright © 2014-2021 Ilkka Seppälä
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.iluwatar.compositeentity;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Composite entity is a Java EE Software design pattern and it is used to model, represent, and
|
|
||||||
* manage a set of interrelated persistent objects rather than representing them as individual
|
|
||||||
* fine-grained entity beans, and also a composite entity bean represents a graph of objects.
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
public class App {
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An instance that a console manages two related objects.
|
|
||||||
*/
|
|
||||||
public App(String message, String signal) {
|
|
||||||
var console = new CompositeEntity();
|
|
||||||
console.init();
|
|
||||||
console.setData(message, signal);
|
|
||||||
Arrays.stream(console.getData()).forEach(LOGGER::info);
|
|
||||||
console.setData("Danger", "Red Light");
|
|
||||||
Arrays.stream(console.getData()).forEach(LOGGER::info);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Program entry point.
|
|
||||||
*
|
|
||||||
* @param args command line args
|
|
||||||
*/
|
|
||||||
public static void main(String[] args) {
|
|
||||||
|
|
||||||
new App("No Danger", "Green Light");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
* The MIT License
|
|
||||||
* Copyright © 2014-2021 Ilkka Seppälä
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.iluwatar.compositeentity;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.stream.IntStream;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A coarse-grained object is an object with its own life cycle manages its own relationships to
|
|
||||||
* other objects. It can be an object contained in the composite entity, or, composite entity itself
|
|
||||||
* can be the coarse-grained object which holds dependent objects.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public abstract class CoarseGrainedObject<T> {
|
|
||||||
|
|
||||||
DependentObject<T>[] dependentObjects;
|
|
||||||
|
|
||||||
public void setData(T... data) {
|
|
||||||
IntStream.range(0, data.length).forEach(i -> dependentObjects[i].setData(data[i]));
|
|
||||||
}
|
|
||||||
|
|
||||||
public T[] getData() {
|
|
||||||
return (T[]) Arrays.stream(dependentObjects).map(DependentObject::getData).toArray();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
* The MIT License
|
|
||||||
* Copyright © 2014-2021 Ilkka Seppälä
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.iluwatar.compositeentity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Composite entity is the coarse-grained entity bean which may be the coarse-grained object, or may
|
|
||||||
* contain a reference to the coarse-grained object.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class CompositeEntity {
|
|
||||||
|
|
||||||
private final ConsoleCoarseGrainedObject console = new ConsoleCoarseGrainedObject();
|
|
||||||
|
|
||||||
public void setData(String message, String signal) {
|
|
||||||
console.setData(message, signal);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] getData() {
|
|
||||||
return console.getData();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void init() {
|
|
||||||
console.init();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
* The MIT License
|
|
||||||
* Copyright © 2014-2021 Ilkka Seppälä
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.iluwatar.compositeentity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A specific CoarseGrainedObject to implement a console.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class ConsoleCoarseGrainedObject extends CoarseGrainedObject<String> {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] getData() {
|
|
||||||
return new String[]{
|
|
||||||
dependentObjects[0].getData(), dependentObjects[1].getData()
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public void init() {
|
|
||||||
dependentObjects = new DependentObject[]{
|
|
||||||
new MessageDependentObject(), new SignalDependentObject()};
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
* The MIT License
|
|
||||||
* Copyright © 2014-2021 Ilkka Seppälä
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.iluwatar.compositeentity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* It is an object, which can contain other dependent objects (there may be a tree of objects within
|
|
||||||
* the composite entity), that depends on the coarse-grained object and has its life cycle managed
|
|
||||||
* by the coarse-grained object.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public abstract class DependentObject<T> {
|
|
||||||
|
|
||||||
T data;
|
|
||||||
|
|
||||||
public void setData(T message) {
|
|
||||||
this.data = message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public T getData() {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
/*
|
|
||||||
* The MIT License
|
|
||||||
* Copyright © 2014-2021 Ilkka Seppälä
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.iluwatar.compositeentity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The first DependentObject to show message.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class MessageDependentObject extends DependentObject<String> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
/*
|
|
||||||
* The MIT License
|
|
||||||
* Copyright © 2014-2021 Ilkka Seppälä
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.iluwatar.compositeentity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The second DependentObject to show message.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class SignalDependentObject extends DependentObject<String> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
* The MIT License
|
|
||||||
* Copyright © 2014-2021 Ilkka Seppälä
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.iluwatar.compositeentity;
|
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* com.iluwatar.compositeentity.App running test
|
|
||||||
*/
|
|
||||||
class AppTest {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Issue: Add at least one assertion to this test case.
|
|
||||||
* <p>
|
|
||||||
* Solution: Inserted assertion to check whether the execution of the main method in {@link
|
|
||||||
* App#main(String[])} throws an exception.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void shouldExecuteApplicationWithoutException() {
|
|
||||||
|
|
||||||
assertDoesNotThrow(() -> App.main(new String[]{}));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,55 +0,0 @@
|
|||||||
/*
|
|
||||||
* The MIT License
|
|
||||||
* Copyright © 2014-2021 Ilkka Seppälä
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.iluwatar.compositeentity;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
|
||||||
|
|
||||||
class PersistenceTest {
|
|
||||||
|
|
||||||
final static ConsoleCoarseGrainedObject console = new ConsoleCoarseGrainedObject();
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void dependentObjectChangedForPersistenceTest() {
|
|
||||||
MessageDependentObject dependentObject = new MessageDependentObject();
|
|
||||||
console.init();
|
|
||||||
console.dependentObjects[0] = dependentObject;
|
|
||||||
String message = "Danger";
|
|
||||||
assertNull(console.dependentObjects[0].getData());
|
|
||||||
dependentObject.setData(message);
|
|
||||||
assertEquals(message, console.dependentObjects[0].getData());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void coarseGrainedObjectChangedForPersistenceTest() {
|
|
||||||
MessageDependentObject dependentObject = new MessageDependentObject();
|
|
||||||
console.init();
|
|
||||||
console.dependentObjects[0] = dependentObject;
|
|
||||||
String message = "Danger";
|
|
||||||
assertNull(console.dependentObjects[0].getData());
|
|
||||||
console.setData(message);
|
|
||||||
assertEquals(message, dependentObject.getData());
|
|
||||||
}
|
|
||||||
}
|
|
@ -4,7 +4,6 @@ title: Composite
|
|||||||
folder: composite
|
folder: composite
|
||||||
permalink: /patterns/composite/
|
permalink: /patterns/composite/
|
||||||
categories: Structural
|
categories: Structural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Gang of Four
|
- Gang of Four
|
||||||
---
|
---
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>composite</artifactId>
|
<artifactId>composite</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Converter
|
|||||||
folder: converter
|
folder: converter
|
||||||
permalink: /patterns/converter/
|
permalink: /patterns/converter/
|
||||||
categories: Creational
|
categories: Creational
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Decoupling
|
- Decoupling
|
||||||
---
|
---
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>converter</artifactId>
|
<artifactId>converter</artifactId>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -4,7 +4,6 @@ title: CQRS
|
|||||||
folder: cqrs
|
folder: cqrs
|
||||||
permalink: /patterns/cqrs/
|
permalink: /patterns/cqrs/
|
||||||
categories: Architectural
|
categories: Architectural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Performance
|
- Performance
|
||||||
- Cloud distributed
|
- Cloud distributed
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>cqrs</artifactId>
|
<artifactId>cqrs</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Data Access Object
|
|||||||
folder: dao
|
folder: dao
|
||||||
permalink: /patterns/dao/
|
permalink: /patterns/dao/
|
||||||
categories: Architectural
|
categories: Architectural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Data access
|
- Data access
|
||||||
---
|
---
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>dao</artifactId>
|
<artifactId>dao</artifactId>
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ folder: data-bus
|
|||||||
permalink: /patterns/data-bus/
|
permalink: /patterns/data-bus/
|
||||||
|
|
||||||
categories: Architectural
|
categories: Architectural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Decoupling
|
- Decoupling
|
||||||
---
|
---
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>data-bus</artifactId>
|
<artifactId>data-bus</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Data Locality
|
|||||||
folder: data-locality
|
folder: data-locality
|
||||||
permalink: /patterns/data-locality/
|
permalink: /patterns/data-locality/
|
||||||
categories: Behavioral
|
categories: Behavioral
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Game programming
|
- Game programming
|
||||||
- Performance
|
- Performance
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>data-locality</artifactId>
|
<artifactId>data-locality</artifactId>
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ title: Data Mapper
|
|||||||
folder: data-mapper
|
folder: data-mapper
|
||||||
permalink: /patterns/data-mapper/
|
permalink: /patterns/data-mapper/
|
||||||
categories: Architectural
|
categories: Architectural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Decoupling
|
- Decoupling
|
||||||
---
|
---
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>data-mapper</artifactId>
|
<artifactId>data-mapper</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Data Transfer Object
|
|||||||
folder: data-transfer-object
|
folder: data-transfer-object
|
||||||
permalink: /patterns/data-transfer-object/
|
permalink: /patterns/data-transfer-object/
|
||||||
categories: Architectural
|
categories: Architectural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Performance
|
- Performance
|
||||||
---
|
---
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>data-transfer-object</artifactId>
|
<artifactId>data-transfer-object</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Decorator
|
|||||||
folder: decorator
|
folder: decorator
|
||||||
permalink: /patterns/decorator/
|
permalink: /patterns/decorator/
|
||||||
categories: Structural
|
categories: Structural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Gang Of Four
|
- Gang Of Four
|
||||||
- Extensibility
|
- Extensibility
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>decorator</artifactId>
|
<artifactId>decorator</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,6 @@ title: Delegation
|
|||||||
folder: delegation
|
folder: delegation
|
||||||
permalink: /patterns/delegation/
|
permalink: /patterns/delegation/
|
||||||
categories: Structural
|
categories: Structural
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Decoupling
|
- Decoupling
|
||||||
---
|
---
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ title: Dependency Injection
|
|||||||
folder: dependency-injection
|
folder: dependency-injection
|
||||||
permalink: /patterns/dependency-injection/
|
permalink: /patterns/dependency-injection/
|
||||||
categories: Creational
|
categories: Creational
|
||||||
language: en
|
|
||||||
tags:
|
tags:
|
||||||
- Decoupling
|
- Decoupling
|
||||||
---
|
---
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.24.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>dependency-injection</artifactId>
|
<artifactId>dependency-injection</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user