Compare commits
20 Commits
all-contri
...
1.25.0
Author | SHA1 | Date | |
---|---|---|---|
925755fa35 | |||
89b2072131 | |||
0a7b524bd1 | |||
36c6ce1df7 | |||
22ddd57146 | |||
72bb189dc0 | |||
bee1283371 | |||
785cbf42b7 | |||
c51eb66c89 | |||
1eb74203fc | |||
c6803f920d | |||
b80ac39e1f | |||
da6d20e997 | |||
5dbb176a33 | |||
e3c3b02efd | |||
988c478ad4 | |||
221daf5d74 | |||
90b1b922e1 | |||
bd71bc1311 | |||
54d19d4c87 |
@ -1676,6 +1676,51 @@
|
|||||||
"contributions": [
|
"contributions": [
|
||||||
"translation"
|
"translation"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "ManviGoel26",
|
||||||
|
"name": "Manvi Goel",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/55682355?v=4",
|
||||||
|
"profile": "https://github.com/ManviGoel26",
|
||||||
|
"contributions": [
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "blueberry404",
|
||||||
|
"name": "Anum Amin",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/39243539?v=4",
|
||||||
|
"profile": "https://github.com/blueberry404",
|
||||||
|
"contributions": [
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "uh-zz",
|
||||||
|
"name": "Reo Uehara",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/47747828?v=4",
|
||||||
|
"profile": "https://uh-zz.github.io/blog/",
|
||||||
|
"contributions": [
|
||||||
|
"translation"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "Fiordy",
|
||||||
|
"name": "Fiordy",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/53420573?v=4",
|
||||||
|
"profile": "https://github.com/Fiordy",
|
||||||
|
"contributions": [
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "harshalkh",
|
||||||
|
"name": "Harshal",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/37841724?v=4",
|
||||||
|
"profile": "https://github.com/harshalkh",
|
||||||
|
"contributions": [
|
||||||
|
"code"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"contributorsPerLine": 7,
|
"contributorsPerLine": 7,
|
||||||
|
49
.github/workflows/maven-ci.yml
vendored
49
.github/workflows/maven-ci.yml
vendored
@ -24,6 +24,9 @@
|
|||||||
# This workflow will build a Java project with Maven
|
# This workflow will build a Java project with Maven
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
||||||
|
|
||||||
|
# We are using two jobs here for testing our code on the latest JDK 11 build as well as a more satble build version of 11.0.3
|
||||||
|
# You can see the full discussion here https://github.com/iluwatar/java-design-patterns/pull/1868#issue-1029459688
|
||||||
|
|
||||||
name: Java CI
|
name: Java CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@ -33,12 +36,11 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
# This Workflow Job will build this project and run Sonar analysis using JDK 11.0.3
|
||||||
|
build-and-analyze:
|
||||||
|
|
||||||
|
name: Build and Run Sonar analysis on JDK 11.0.3
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
java-version: [ 11.0.3, 11 ]
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
@ -47,12 +49,14 @@ jobs:
|
|||||||
# 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 ${{ matrix.java-version }}
|
- name: Set up JDK 11.0.3
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: 11.0.3
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
|
cache: 'maven'
|
||||||
|
|
||||||
|
# Cache Sonar packages which as used to run anaylysis and collect metrics
|
||||||
- name: Cache SonarCloud packages
|
- name: Cache SonarCloud packages
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -60,14 +64,6 @@ jobs:
|
|||||||
key: ${{ runner.os }}-sonar
|
key: ${{ runner.os }}-sonar
|
||||||
restore-keys: ${{ runner.os }}-sonar
|
restore-keys: ${{ runner.os }}-sonar
|
||||||
|
|
||||||
- name: Cache Maven dependencies
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.m2/repository
|
|
||||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-maven-
|
|
||||||
|
|
||||||
# Some tests need screen access
|
# Some tests need screen access
|
||||||
- name: Install xvfb
|
- name: Install xvfb
|
||||||
run: sudo apt-get install -y xvfb
|
run: sudo apt-get install -y xvfb
|
||||||
@ -78,3 +74,28 @@ jobs:
|
|||||||
# These two env variables are needed for sonar analysis
|
# These two env variables are needed for sonar analysis
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
|
# This Workflow Job is going to build the project on the latest stable JDK 11
|
||||||
|
build:
|
||||||
|
|
||||||
|
name: Build and Test on JDK 11
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up JDK 11 (Latest)
|
||||||
|
uses: actions/setup-java@v2
|
||||||
|
with:
|
||||||
|
java-version: 11
|
||||||
|
distribution: 'zulu'
|
||||||
|
cache: 'maven'
|
||||||
|
|
||||||
|
# Some tests need screen access
|
||||||
|
- name: Install xvfb
|
||||||
|
run: sudo apt-get install -y xvfb
|
||||||
|
|
||||||
|
- name: Build with Maven
|
||||||
|
run: xvfb-run ./mvnw clean verify
|
||||||
|
11
.github/workflows/maven-pr-builder.yml
vendored
11
.github/workflows/maven-pr-builder.yml
vendored
@ -34,11 +34,13 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
|
name: Build JDP
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java-version: [ 11.0.3, 11 ]
|
java-version: [ 11.0.3, 11 ]
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
@ -47,14 +49,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
|
cache: 'maven'
|
||||||
- name: Cache Maven Dependecies
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.m2/repository
|
|
||||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-maven-
|
|
||||||
|
|
||||||
# Some tests need screen access
|
# Some tests need screen access
|
||||||
- name: Install xvfb
|
- name: Install xvfb
|
||||||
|
@ -10,12 +10,12 @@
|
|||||||
[](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), [**pt**](localization/pt/README.md), [**id**](localization/id/README.md), [**ru**](localization/ru/README.md), [**de**](localization/de/README.md)
|
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), [**pt**](localization/pt/README.md), [**id**](localization/id/README.md), [**ru**](localization/ru/README.md), [**de**](localization/de/README.md), [**ja**](localization/ja/README.md)
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
@ -312,6 +312,11 @@ This project is licensed under the terms of the MIT license.
|
|||||||
<tr>
|
<tr>
|
||||||
<td align="center"><a href="http://carlfx.wordpress.com"><img src="https://avatars.githubusercontent.com/u/1594624?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Carl Dea</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=carldea" title="Code">💻</a></td>
|
<td align="center"><a href="http://carlfx.wordpress.com"><img src="https://avatars.githubusercontent.com/u/1594624?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Carl Dea</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=carldea" title="Code">💻</a></td>
|
||||||
<td align="center"><a href="https://github.com/Mozartuss"><img src="https://avatars.githubusercontent.com/u/32893711?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mozartus</b></sub></a><br /><a href="#translation-Mozartuss" title="Translation">🌍</a></td>
|
<td align="center"><a href="https://github.com/Mozartuss"><img src="https://avatars.githubusercontent.com/u/32893711?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mozartus</b></sub></a><br /><a href="#translation-Mozartuss" title="Translation">🌍</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/ManviGoel26"><img src="https://avatars.githubusercontent.com/u/55682355?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Manvi Goel</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ManviGoel26" title="Documentation">📖</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/blueberry404"><img src="https://avatars.githubusercontent.com/u/39243539?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anum Amin</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=blueberry404" title="Documentation">📖</a></td>
|
||||||
|
<td align="center"><a href="https://uh-zz.github.io/blog/"><img src="https://avatars.githubusercontent.com/u/47747828?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Reo Uehara</b></sub></a><br /><a href="#translation-uh-zz" title="Translation">🌍</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/Fiordy"><img src="https://avatars.githubusercontent.com/u/53420573?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Fiordy</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Fiordy" title="Documentation">📖</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/harshalkh"><img src="https://avatars.githubusercontent.com/u/37841724?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Harshal</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=harshalkh" title="Code">💻</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -28,7 +28,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>abstract-document</artifactId>
|
<artifactId>abstract-document</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -87,24 +87,36 @@ public interface KingdomFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class ElfKingdomFactory implements KingdomFactory {
|
public class ElfKingdomFactory implements KingdomFactory {
|
||||||
|
|
||||||
|
@Override
|
||||||
public Castle createCastle() {
|
public Castle createCastle() {
|
||||||
return new ElfCastle();
|
return new ElfCastle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public King createKing() {
|
public King createKing() {
|
||||||
return new ElfKing();
|
return new ElfKing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Army createArmy() {
|
public Army createArmy() {
|
||||||
return new ElfArmy();
|
return new ElfArmy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class OrcKingdomFactory implements KingdomFactory {
|
public class OrcKingdomFactory implements KingdomFactory {
|
||||||
|
|
||||||
|
@Override
|
||||||
public Castle createCastle() {
|
public Castle createCastle() {
|
||||||
return new OrcCastle();
|
return new OrcCastle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public King createKing() {
|
public King createKing() {
|
||||||
return new OrcKing();
|
return new OrcKing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Army createArmy() {
|
public Army createArmy() {
|
||||||
return new OrcArmy();
|
return new OrcArmy();
|
||||||
}
|
}
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>abstract-factory</artifactId>
|
<artifactId>abstract-factory</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -124,3 +124,7 @@ Now, we can create multiple creatures such as Orcs, tell them to eat and roam, a
|
|||||||
## Class diagram
|
## Class diagram
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## Tutorials
|
||||||
|
|
||||||
|
* [Android and Java Concurrency: The Active Object Pattern](https://www.youtube.com/watch?v=Cd8t2u5Qmvc)
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>active-object</artifactId>
|
<artifactId>active-object</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -138,6 +138,10 @@ This pattern can be used:
|
|||||||
* When the visited class hierarchy will be frequently extended with new derivatives of the Element class.
|
* When the visited class hierarchy will be frequently extended with new derivatives of the Element class.
|
||||||
* When the recompilation, relinking, retesting or redistribution of the derivatives of Element is very expensive.
|
* When the recompilation, relinking, retesting or redistribution of the derivatives of Element is very expensive.
|
||||||
|
|
||||||
|
## Tutorial
|
||||||
|
|
||||||
|
* [Acyclic Visitor Pattern Example](https://codecrafter.blogspot.com/2012/12/the-acyclic-visitor-pattern.html)
|
||||||
|
|
||||||
## Consequences
|
## Consequences
|
||||||
|
|
||||||
The good:
|
The good:
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>acyclic-visitor</artifactId>
|
<artifactId>acyclic-visitor</artifactId>
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -105,6 +105,12 @@ Use the Adapter pattern when
|
|||||||
* you need to use several existing subclasses, but it's impractical to adapt their interface by subclassing every one. An object adapter can adapt the interface of its parent class.
|
* you need to use several existing subclasses, but it's impractical to adapt their interface by subclassing every one. An object adapter can adapt the interface of its parent class.
|
||||||
* most of the applications using third party libraries use adapters as a middle layer between the application and the 3rd party library to decouple the application from the library. If another library has to be used only an adapter for the new library is required without having to change the application code.
|
* most of the applications using third party libraries use adapters as a middle layer between the application and the 3rd party library to decouple the application from the library. If another library has to be used only an adapter for the new library is required without having to change the application code.
|
||||||
|
|
||||||
|
## Tutorials
|
||||||
|
|
||||||
|
* [Dzone](https://dzone.com/articles/adapter-design-pattern-in-java)
|
||||||
|
* [Refactoring Guru](https://refactoring.guru/design-patterns/adapter/java/example)
|
||||||
|
* [Baeldung](https://www.baeldung.com/java-adapter-pattern)
|
||||||
|
|
||||||
## Consequences
|
## Consequences
|
||||||
Class and object adapters have different trade-offs. A class adapter
|
Class and object adapters have different trade-offs. A class adapter
|
||||||
|
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>adapter</artifactId>
|
<artifactId>adapter</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>aggregator-service</artifactId>
|
<artifactId>aggregator-service</artifactId>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>information-microservice</artifactId>
|
<artifactId>information-microservice</artifactId>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>inventory-microservice</artifactId>
|
<artifactId>inventory-microservice</artifactId>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>aggregator-microservices</artifactId>
|
<artifactId>aggregator-microservices</artifactId>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>ambassador</artifactId>
|
<artifactId>ambassador</artifactId>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>api-gateway-service</artifactId>
|
<artifactId>api-gateway-service</artifactId>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>image-microservice</artifactId>
|
<artifactId>image-microservice</artifactId>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>api-gateway</artifactId>
|
<artifactId>api-gateway</artifactId>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>price-microservice</artifactId>
|
<artifactId>price-microservice</artifactId>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>arrange-act-assert</artifactId>
|
<artifactId>arrange-act-assert</artifactId>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>async-method-invocation</artifactId>
|
<artifactId>async-method-invocation</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>balking</artifactId>
|
<artifactId>balking</artifactId>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>bridge</artifactId>
|
<artifactId>bridge</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -134,6 +134,12 @@ Use the Builder pattern when
|
|||||||
* The algorithm for creating a complex object should be independent of the parts that make up the object and how they're assembled
|
* The algorithm for creating a complex object should be independent of the parts that make up the object and how they're assembled
|
||||||
* The construction process must allow different representations for the object that's constructed
|
* The construction process must allow different representations for the object that's constructed
|
||||||
|
|
||||||
|
## Tutorials
|
||||||
|
|
||||||
|
* [Refactoring Guru](https://refactoring.guru/design-patterns/builder)
|
||||||
|
* [Oracle Blog](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java)
|
||||||
|
* [Journal Dev](https://www.journaldev.com/1425/builder-design-pattern-in-java)
|
||||||
|
|
||||||
## Known uses
|
## Known uses
|
||||||
|
|
||||||
* [java.lang.StringBuilder](http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html)
|
* [java.lang.StringBuilder](http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html)
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>builder</artifactId>
|
<artifactId>builder</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>business-delegate</artifactId>
|
<artifactId>business-delegate</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>bytecode</artifactId>
|
<artifactId>bytecode</artifactId>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>caching</artifactId>
|
<artifactId>caching</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>callback</artifactId>
|
<artifactId>callback</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>chain-of-responsibility</artifactId>
|
<artifactId>chain-of-responsibility</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>circuit-breaker</artifactId>
|
<artifactId>circuit-breaker</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>collection-pipeline</artifactId>
|
<artifactId>collection-pipeline</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>combinator</artifactId>
|
<artifactId>combinator</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>command</artifactId>
|
<artifactId>command</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>commander</artifactId>
|
<artifactId>commander</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>composite-entity</artifactId>
|
<artifactId>composite-entity</artifactId>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>composite</artifactId>
|
<artifactId>composite</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>converter</artifactId>
|
<artifactId>converter</artifactId>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>cqrs</artifactId>
|
<artifactId>cqrs</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>dao</artifactId>
|
<artifactId>dao</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>data-bus</artifactId>
|
<artifactId>data-bus</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>data-locality</artifactId>
|
<artifactId>data-locality</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>data-mapper</artifactId>
|
<artifactId>data-mapper</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>data-transfer-object</artifactId>
|
<artifactId>data-transfer-object</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>decorator</artifactId>
|
<artifactId>decorator</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>delegation</artifactId>
|
<artifactId>delegation</artifactId>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>dependency-injection</artifactId>
|
<artifactId>dependency-injection</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -28,10 +28,10 @@
|
|||||||
<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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>dirty-flag</artifactId>
|
<artifactId>dirty-flag</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.25.0</version>
|
||||||
<name>dirty-flag</name>
|
<name>dirty-flag</name>
|
||||||
<url>http://maven.apache.org</url>
|
<url>http://maven.apache.org</url>
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>domain-model</artifactId>
|
<artifactId>domain-model</artifactId>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>double-buffer</artifactId>
|
<artifactId>double-buffer</artifactId>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>double-checked-locking</artifactId>
|
<artifactId>double-checked-locking</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>double-dispatch</artifactId>
|
<artifactId>double-dispatch</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>eip-message-channel</artifactId>
|
<artifactId>eip-message-channel</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>eip-publish-subscribe</artifactId>
|
<artifactId>eip-publish-subscribe</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>event-aggregator</artifactId>
|
<artifactId>event-aggregator</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>event-asynchronous</artifactId>
|
<artifactId>event-asynchronous</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>event-driven-architecture</artifactId>
|
<artifactId>event-driven-architecture</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -28,7 +28,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>event-queue</artifactId>
|
<artifactId>event-queue</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -28,7 +28,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>event-sourcing</artifactId>
|
<artifactId>event-sourcing</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>execute-around</artifactId>
|
<artifactId>execute-around</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>extension-objects</artifactId>
|
<artifactId>extension-objects</artifactId>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>facade</artifactId>
|
<artifactId>facade</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>factory-kit</artifactId>
|
<artifactId>factory-kit</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>factory-method</artifactId>
|
<artifactId>factory-method</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -41,6 +41,8 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class App {
|
public class App {
|
||||||
|
|
||||||
|
private static final String MANUFACTURED = "{} manufactured {}";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Program entry point.
|
* Program entry point.
|
||||||
* @param args command line args
|
* @param args command line args
|
||||||
@ -49,14 +51,14 @@ public class App {
|
|||||||
|
|
||||||
Blacksmith blacksmith = new OrcBlacksmith();
|
Blacksmith blacksmith = new OrcBlacksmith();
|
||||||
Weapon weapon = blacksmith.manufactureWeapon(WeaponType.SPEAR);
|
Weapon weapon = blacksmith.manufactureWeapon(WeaponType.SPEAR);
|
||||||
LOGGER.info("{} manufactured {}", blacksmith, weapon);
|
LOGGER.info(MANUFACTURED, blacksmith, weapon);
|
||||||
weapon = blacksmith.manufactureWeapon(WeaponType.AXE);
|
weapon = blacksmith.manufactureWeapon(WeaponType.AXE);
|
||||||
LOGGER.info("{} manufactured {}", blacksmith, weapon);
|
LOGGER.info(MANUFACTURED, blacksmith, weapon);
|
||||||
|
|
||||||
blacksmith = new ElfBlacksmith();
|
blacksmith = new ElfBlacksmith();
|
||||||
weapon = blacksmith.manufactureWeapon(WeaponType.SPEAR);
|
weapon = blacksmith.manufactureWeapon(WeaponType.SPEAR);
|
||||||
LOGGER.info("{} manufactured {}", blacksmith, weapon);
|
LOGGER.info(MANUFACTURED, blacksmith, weapon);
|
||||||
weapon = blacksmith.manufactureWeapon(WeaponType.AXE);
|
weapon = blacksmith.manufactureWeapon(WeaponType.AXE);
|
||||||
LOGGER.info("{} manufactured {}", blacksmith, weapon);
|
LOGGER.info(MANUFACTURED, blacksmith, weapon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>factory</artifactId>
|
<artifactId>factory</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -31,7 +31,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>fanout-fanin</artifactId>
|
<artifactId>fanout-fanin</artifactId>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>feature-toggle</artifactId>
|
<artifactId>feature-toggle</artifactId>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>filterer</artifactId>
|
<artifactId>filterer</artifactId>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>fluentinterface</artifactId>
|
<artifactId>fluentinterface</artifactId>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>flux</artifactId>
|
<artifactId>flux</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>flyweight</artifactId>
|
<artifactId>flyweight</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>front-controller</artifactId>
|
<artifactId>front-controller</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>game-loop</artifactId>
|
<artifactId>game-loop</artifactId>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<artifactId>guarded-suspension</artifactId>
|
<artifactId>guarded-suspension</artifactId>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>half-sync-half-async</artifactId>
|
<artifactId>half-sync-half-async</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>hexagonal</artifactId>
|
<artifactId>hexagonal</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>intercepting-filter</artifactId>
|
<artifactId>intercepting-filter</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>interpreter</artifactId>
|
<artifactId>interpreter</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>iterator</artifactId>
|
<artifactId>iterator</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>com.iluwatar.layers</groupId>
|
<groupId>com.iluwatar.layers</groupId>
|
||||||
<artifactId>layers</artifactId>
|
<artifactId>layers</artifactId>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>lazy-loading</artifactId>
|
<artifactId>lazy-loading</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -28,7 +28,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>leader-election</artifactId>
|
<artifactId>leader-election</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>leader-followers</artifactId>
|
<artifactId>leader-followers</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -57,9 +57,11 @@ public class Worker implements Runnable {
|
|||||||
try {
|
try {
|
||||||
if (workCenter.getLeader() != null && !workCenter.getLeader().equals(this)) {
|
if (workCenter.getLeader() != null && !workCenter.getLeader().equals(this)) {
|
||||||
synchronized (workCenter) {
|
synchronized (workCenter) {
|
||||||
workCenter.wait();
|
if (workCenter.getLeader() != null && !workCenter.getLeader().equals(this)) {
|
||||||
|
workCenter.wait();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
final Task task = taskSet.getTask();
|
final Task task = taskSet.getTask();
|
||||||
synchronized (workCenter) {
|
synchronized (workCenter) {
|
||||||
|
59
localization/ja/README.md
Normal file
59
localization/ja/README.md
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# Java で実装されたデザインパターン
|
||||||
|
|
||||||
|

|
||||||
|
[](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://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 -->
|
||||||
|
|
||||||
|
[](#contributors-)
|
||||||
|
|
||||||
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||||
|
|
||||||
|
# はじめに
|
||||||
|
|
||||||
|
デザインパターンとは、アプリケーションやシステムを設計する際によくある問題を解決するために、プログラマーが使用できる形式化された最良の手法です。
|
||||||
|
|
||||||
|
デザインパターンは、テストされ、証明された開発パラダイムを提供することで、開発プロセスを高速化することができます。
|
||||||
|
|
||||||
|
デザインパターンを再利用することで、大きな問題を引き起こす微妙な問題を防ぐことができます。
|
||||||
|
また、デザインパターンを熟知したコーダーやアーキテクトにとっても、コードの読みやすさが向上します。
|
||||||
|
|
||||||
|
# はじめる
|
||||||
|
|
||||||
|
このサイトでは、Java のデザインパターンを紹介しています。
|
||||||
|
これらのソリューションは、オープンソースコミュニティの経験豊富なプログラマーやアーキテクトによって開発されています。
|
||||||
|
|
||||||
|
パターンは、ハイレベルの説明またはソースコードを確認することで参照できます。
|
||||||
|
|
||||||
|
ソースコードの例はよくコメントされていて、特定のパターンをどのように実装するかを説明するプログラミングチュートリアルのようなものです。
|
||||||
|
|
||||||
|
私たちは、最も一般的で実績のあるオープンソースの Java 技術を使用しています。
|
||||||
|
|
||||||
|
資料に飛び込む前に、さまざまな[ソフトウェア設計の原則](https://java-design-patterns.com/principles/)に精通している必要があります。
|
||||||
|
|
||||||
|
すべてのデザインは、可能な限りシンプルであるべきです。
|
||||||
|
|
||||||
|
KISS(シンプルにしておけ!この間抜け)、YAGNI(機能は実際に必要となるまでは追加しないのがよい)、そして Do The Simplest Thing That Could Possibly Work(機能する可能性のある中で最もシンプルなことをする)の原則に基づいて設計を始めるべきです。
|
||||||
|
|
||||||
|
複雑さやパターンは、実用的な拡張性が必要な場合にのみ導入すべきです。
|
||||||
|
|
||||||
|
これらの概念を理解した上で、以下のような方法で[デザインパターン](https://java-design-patterns.com/patterns/) を掘り下げていくことができます。
|
||||||
|
|
||||||
|
- 特定のパターンを、パターン名で検索することができます。見つかない場合は、新しいパターンを[ここ](https://github.com/iluwatar/java-design-patterns/issues)で報告してください
|
||||||
|
- `Performance`, `Gang of Four` もしくは`Data access`などのタグを使用。
|
||||||
|
- `Creational`, `Behavioral`などのパターンカテゴリーを使用。
|
||||||
|
|
||||||
|
このサイトで紹介されているオブジェクト指向のソリューションが、あなたのアーキテクチャに役立ち、私たちが開発したように楽しく学ぶことができますように。
|
||||||
|
|
||||||
|
# コントリビュート方法
|
||||||
|
|
||||||
|
プロジェクトに貢献したいとお考えの方は、[開発者 wiki](https://github.com/iluwatar/java-design-patterns/wiki)に関連情報が掲載されています。
|
||||||
|
|
||||||
|
私たちは、[Gitter チャットルーム](https://gitter.im/iluwatar/java-design-patterns)であなたの質問にお答えします。
|
||||||
|
|
||||||
|
# ライセンス
|
||||||
|
|
||||||
|
このプロジェクトは、MIT ライセンスの条件の下でライセンスされています。
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>lockable-object</artifactId>
|
<artifactId>lockable-object</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -27,7 +27,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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>marker</artifactId>
|
<artifactId>marker</artifactId>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>master-worker-pattern</artifactId>
|
<artifactId>master-worker-pattern</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>mediator</artifactId>
|
<artifactId>mediator</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>memento</artifactId>
|
<artifactId>memento</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>model-view-controller</artifactId>
|
<artifactId>model-view-controller</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>model-view-presenter</artifactId>
|
<artifactId>model-view-presenter</artifactId>
|
||||||
<name>model-view-presenter</name>
|
<name>model-view-presenter</name>
|
||||||
|
@ -32,11 +32,11 @@
|
|||||||
<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.25.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>model-view-viewmodel</artifactId>
|
<artifactId>model-view-viewmodel</artifactId>
|
||||||
<version>1.25.0-SNAPSHOT</version>
|
<version>1.25.0</version>
|
||||||
<properties>
|
<properties>
|
||||||
<zk.version>9.0.0</zk.version>
|
<zk.version>9.0.0</zk.version>
|
||||||
<guava.version>19.0</guava.version>
|
<guava.version>19.0</guava.version>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user