Merge branch 'master' of github.com:iluwatar/java-design-patterns
This commit is contained in:
commit
7a13012855
README.md
abstract-document
abstract-factory
adapter
aggregator-microservices
api-gateway
async-method-invocation
balking
bridge
builder
business-delegate
caching
callback
chain
command
composite
converter
cqrs
dao
data-bus
data-mapper
data-transfer-object
decorator
delegation
dependency-injection
double-checked-locking
double-dispatch
eip-aggregator
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
feature-toggle
fluentinterface
flux
flyweight
front-controller
guarded-suspension
half-sync-half-async
hexagonal
intercepting-filter
interpreter
iterator
layers
lazy-loading
marker
mediator
memento
message-channel
model-view-controller
model-view-presenter
module
monad
monostate
multiton
mute-idiom
mutex
naked-objects
null-object
object-mother
object-pool
observer
page-object
partial-response
poison-pill
pom.xmlprivate-class-data
producer-consumer
promise
property
@ -7,7 +7,7 @@
|
|||||||
[](https://travis-ci.org/iluwatar/java-design-patterns)
|
[](https://travis-ci.org/iluwatar/java-design-patterns)
|
||||||
[](https://raw.githubusercontent.com/iluwatar/java-design-patterns/master/LICENSE.md)
|
[](https://raw.githubusercontent.com/iluwatar/java-design-patterns/master/LICENSE.md)
|
||||||
[](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)
|
||||||
[](https://sonarcloud.io/dashboard/index/com.iluwatar%3Ajava-design-patterns)
|
[](https://sonarcloud.io/dashboard/index/com.iluwatar%3Ajava-design-patterns)
|
||||||
[](https://bestpractices.coreinfrastructure.org/projects/1503)
|
[](https://bestpractices.coreinfrastructure.org/projects/1503)
|
||||||
|
|
||||||
# Introduction
|
# Introduction
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>abstract-document</artifactId>
|
<artifactId>abstract-document</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -34,7 +34,7 @@ Wikipedia says
|
|||||||
|
|
||||||
Translating the kingdom example above. First of all we have some interfaces and implementation for the objects in the kingdom
|
Translating the kingdom example above. First of all we have some interfaces and implementation for the objects in the kingdom
|
||||||
|
|
||||||
```
|
```java
|
||||||
public interface Castle {
|
public interface Castle {
|
||||||
String getDescription();
|
String getDescription();
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ public class ElfArmy implements Army {
|
|||||||
|
|
||||||
Then we have the abstraction and implementations for the kingdom factory
|
Then we have the abstraction and implementations for the kingdom factory
|
||||||
|
|
||||||
```
|
```java
|
||||||
public interface KingdomFactory {
|
public interface KingdomFactory {
|
||||||
Castle createCastle();
|
Castle createCastle();
|
||||||
King createKing();
|
King createKing();
|
||||||
@ -108,7 +108,7 @@ public class OrcKingdomFactory implements KingdomFactory {
|
|||||||
|
|
||||||
Now we have our abstract factory that lets us make family of related objects i.e. Elven kingdom factory creates Elven castle, king and army etc.
|
Now we have our abstract factory that lets us make family of related objects i.e. Elven kingdom factory creates Elven castle, king and army etc.
|
||||||
|
|
||||||
```
|
```java
|
||||||
KingdomFactory factory = new ElfKingdomFactory();
|
KingdomFactory factory = new ElfKingdomFactory();
|
||||||
Castle castle = factory.createCastle();
|
Castle castle = factory.createCastle();
|
||||||
King king = factory.createKing();
|
King king = factory.createKing();
|
||||||
@ -123,7 +123,7 @@ Now, we can design a factory for our different kingdom factories. In this exampl
|
|||||||
The client can use FactoryMaker to create the desired concrete factory which, in turn, will produce different concrete objects (Army, King, Castle).
|
The client can use FactoryMaker to create the desired concrete factory which, in turn, will produce different concrete objects (Army, King, Castle).
|
||||||
In this example, we also used an enum to parameterize which type of kingdom factory the client will ask for.
|
In this example, we also used an enum to parameterize which type of kingdom factory the client will ask for.
|
||||||
|
|
||||||
```
|
```java
|
||||||
public static class FactoryMaker {
|
public static class FactoryMaker {
|
||||||
|
|
||||||
public enum KingdomType {
|
public enum KingdomType {
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>abstract-factory</artifactId>
|
<artifactId>abstract-factory</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -40,7 +40,7 @@ Consider a captain that can only use rowing boats and cannot sail at all.
|
|||||||
|
|
||||||
First we have interfaces `RowingBoat` and `FishingBoat`
|
First we have interfaces `RowingBoat` and `FishingBoat`
|
||||||
|
|
||||||
```
|
```java
|
||||||
public interface RowingBoat {
|
public interface RowingBoat {
|
||||||
void row();
|
void row();
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ public class FishingBoat {
|
|||||||
|
|
||||||
And captain expects an implementation of `RowingBoat` interface to be able to move
|
And captain expects an implementation of `RowingBoat` interface to be able to move
|
||||||
|
|
||||||
```
|
```java
|
||||||
public class Captain implements RowingBoat {
|
public class Captain implements RowingBoat {
|
||||||
|
|
||||||
private RowingBoat rowingBoat;
|
private RowingBoat rowingBoat;
|
||||||
@ -73,7 +73,7 @@ public class Captain implements RowingBoat {
|
|||||||
|
|
||||||
Now let's say the pirates are coming and our captain needs to escape but there is only fishing boat available. We need to create an adapter that allows the captain to operate the fishing boat with his rowing boat skills.
|
Now let's say the pirates are coming and our captain needs to escape but there is only fishing boat available. We need to create an adapter that allows the captain to operate the fishing boat with his rowing boat skills.
|
||||||
|
|
||||||
```
|
```java
|
||||||
public class FishingBoatAdapter implements RowingBoat {
|
public class FishingBoatAdapter implements RowingBoat {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(FishingBoatAdapter.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(FishingBoatAdapter.class);
|
||||||
@ -93,7 +93,7 @@ public class FishingBoatAdapter implements RowingBoat {
|
|||||||
|
|
||||||
And now the `Captain` can use the `FishingBoat` to escape the pirates.
|
And now the `Captain` can use the `FishingBoat` to escape the pirates.
|
||||||
|
|
||||||
```
|
```java
|
||||||
Captain captain = new Captain(new FishingBoatAdapter());
|
Captain captain = new Captain(new FishingBoatAdapter());
|
||||||
captain.row();
|
captain.row();
|
||||||
```
|
```
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>adapter</artifactId>
|
<artifactId>adapter</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>aggregator-microservices</artifactId>
|
<artifactId>aggregator-microservices</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.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.19.0-SNAPSHOT</version>
|
<version>1.20.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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>aggregator-microservices</artifactId>
|
<artifactId>aggregator-microservices</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.19.0-SNAPSHOT</version>
|
<version>1.20.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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>async-method-invocation</artifactId>
|
<artifactId>async-method-invocation</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.iluwatar.balking;
|
package com.iluwatar.balking;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
@ -37,6 +38,7 @@ public class WashingMachineTest {
|
|||||||
|
|
||||||
private volatile WashingMachineState machineStateGlobal;
|
private volatile WashingMachineState machineStateGlobal;
|
||||||
|
|
||||||
|
@Disabled
|
||||||
@Test
|
@Test
|
||||||
public void wash() throws Exception {
|
public void wash() throws Exception {
|
||||||
WashingMachine washingMachine = new WashingMachine();
|
WashingMachine washingMachine = new WashingMachine();
|
||||||
|
@ -34,7 +34,7 @@ Wikipedia says
|
|||||||
|
|
||||||
Translating our weapon example from above. Here we have the `Weapon` hierarchy
|
Translating our weapon example from above. Here we have the `Weapon` hierarchy
|
||||||
|
|
||||||
```
|
```java
|
||||||
public interface Weapon {
|
public interface Weapon {
|
||||||
void wield();
|
void wield();
|
||||||
void swing();
|
void swing();
|
||||||
@ -109,7 +109,7 @@ public class Hammer implements Weapon {
|
|||||||
|
|
||||||
And the separate enchantment hierarchy
|
And the separate enchantment hierarchy
|
||||||
|
|
||||||
```
|
```java
|
||||||
public interface Enchantment {
|
public interface Enchantment {
|
||||||
void onActivate();
|
void onActivate();
|
||||||
void apply();
|
void apply();
|
||||||
@ -155,7 +155,7 @@ public class SoulEatingEnchantment implements Enchantment {
|
|||||||
|
|
||||||
And both the hierarchies in action
|
And both the hierarchies in action
|
||||||
|
|
||||||
```
|
```java
|
||||||
Sword enchantedSword = new Sword(new SoulEatingEnchantment());
|
Sword enchantedSword = new Sword(new SoulEatingEnchantment());
|
||||||
enchantedSword.wield();
|
enchantedSword.wield();
|
||||||
enchantedSword.swing();
|
enchantedSword.swing();
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>bridge</artifactId>
|
<artifactId>bridge</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -31,7 +31,7 @@ Wikipedia says
|
|||||||
|
|
||||||
Having said that let me add a bit about what telescoping constructor anti-pattern is. At one point or the other we have all seen a constructor like below:
|
Having said that let me add a bit about what telescoping constructor anti-pattern is. At one point or the other we have all seen a constructor like below:
|
||||||
|
|
||||||
```
|
```java
|
||||||
public Hero(Profession profession, String name, HairType hairType, HairColor hairColor, Armor armor, Weapon weapon) {
|
public Hero(Profession profession, String name, HairType hairType, HairColor hairColor, Armor armor, Weapon weapon) {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -42,7 +42,7 @@ As you can see the number of constructor parameters can quickly get out of hand
|
|||||||
|
|
||||||
The sane alternative is to use the Builder pattern. First of all we have our hero that we want to create
|
The sane alternative is to use the Builder pattern. First of all we have our hero that we want to create
|
||||||
|
|
||||||
```
|
```java
|
||||||
public final class Hero {
|
public final class Hero {
|
||||||
private final Profession profession;
|
private final Profession profession;
|
||||||
private final String name;
|
private final String name;
|
||||||
@ -64,7 +64,7 @@ public final class Hero {
|
|||||||
|
|
||||||
And then we have the builder
|
And then we have the builder
|
||||||
|
|
||||||
```
|
```java
|
||||||
public static class Builder {
|
public static class Builder {
|
||||||
private final Profession profession;
|
private final Profession profession;
|
||||||
private final String name;
|
private final String name;
|
||||||
@ -109,7 +109,7 @@ And then we have the builder
|
|||||||
|
|
||||||
And then it can be used as:
|
And then it can be used as:
|
||||||
|
|
||||||
```
|
```java
|
||||||
Hero mage = new Hero.Builder(Profession.MAGE, "Riobard").withHairColor(HairColor.BLACK).withWeapon(Weapon.DAGGER).build();
|
Hero mage = new Hero.Builder(Profession.MAGE, "Riobard").withHairColor(HairColor.BLACK).withWeapon(Weapon.DAGGER).build();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>builder</artifactId>
|
<artifactId>builder</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>business-delegate</artifactId>
|
<artifactId>business-delegate</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>caching</artifactId>
|
<artifactId>caching</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>callback</artifactId>
|
<artifactId>callback</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -33,7 +33,7 @@ Wikipedia says
|
|||||||
|
|
||||||
Translating our example with orcs from above. First we have the request class
|
Translating our example with orcs from above. First we have the request class
|
||||||
|
|
||||||
```
|
```java
|
||||||
public class Request {
|
public class Request {
|
||||||
|
|
||||||
private final RequestType requestType;
|
private final RequestType requestType;
|
||||||
@ -64,7 +64,7 @@ public enum RequestType {
|
|||||||
|
|
||||||
Then the request handler hierarchy
|
Then the request handler hierarchy
|
||||||
|
|
||||||
```
|
```java
|
||||||
public abstract class RequestHandler {
|
public abstract class RequestHandler {
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(RequestHandler.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(RequestHandler.class);
|
||||||
private RequestHandler next;
|
private RequestHandler next;
|
||||||
@ -114,7 +114,7 @@ public class OrcCommander extends RequestHandler {
|
|||||||
|
|
||||||
Then we have the Orc King who gives the orders and forms the chain
|
Then we have the Orc King who gives the orders and forms the chain
|
||||||
|
|
||||||
```
|
```java
|
||||||
public class OrcKing {
|
public class OrcKing {
|
||||||
RequestHandler chain;
|
RequestHandler chain;
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ public class OrcKing {
|
|||||||
|
|
||||||
Then it is used as follows
|
Then it is used as follows
|
||||||
|
|
||||||
```
|
```java
|
||||||
OrcKing king = new OrcKing();
|
OrcKing king = new OrcKing();
|
||||||
king.makeRequest(new Request(RequestType.DEFEND_CASTLE, "defend castle")); // Orc commander handling request "defend castle"
|
king.makeRequest(new Request(RequestType.DEFEND_CASTLE, "defend castle")); // Orc commander handling request "defend castle"
|
||||||
king.makeRequest(new Request(RequestType.TORTURE_PRISONER, "torture prisoner")); // Orc officer handling request "torture prisoner"
|
king.makeRequest(new Request(RequestType.TORTURE_PRISONER, "torture prisoner")); // Orc officer handling request "torture prisoner"
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>chain</artifactId>
|
<artifactId>chain</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>command</artifactId>
|
<artifactId>command</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -33,7 +33,7 @@ Wikipedia says
|
|||||||
|
|
||||||
Taking our sentence example from above. Here we have the base class and different printable types
|
Taking our sentence example from above. Here we have the base class and different printable types
|
||||||
|
|
||||||
```
|
```java
|
||||||
public abstract class LetterComposite {
|
public abstract class LetterComposite {
|
||||||
private List<LetterComposite> children = new ArrayList<>();
|
private List<LetterComposite> children = new ArrayList<>();
|
||||||
public void add(LetterComposite letter) {
|
public void add(LetterComposite letter) {
|
||||||
@ -91,7 +91,7 @@ public class Sentence extends LetterComposite {
|
|||||||
|
|
||||||
Then we have a messenger to carry messages
|
Then we have a messenger to carry messages
|
||||||
|
|
||||||
```
|
```java
|
||||||
public class Messenger {
|
public class Messenger {
|
||||||
LetterComposite messageFromOrcs() {
|
LetterComposite messageFromOrcs() {
|
||||||
List<Word> words = new ArrayList<>();
|
List<Word> words = new ArrayList<>();
|
||||||
@ -122,7 +122,7 @@ public class Messenger {
|
|||||||
|
|
||||||
And then it can be used as
|
And then it can be used as
|
||||||
|
|
||||||
```
|
```java
|
||||||
LetterComposite orcMessage = new Messenger().messageFromOrcs();
|
LetterComposite orcMessage = new Messenger().messageFromOrcs();
|
||||||
orcMessage.print(); // Where there is a whip there is a way.
|
orcMessage.print(); // Where there is a whip there is a way.
|
||||||
LetterComposite elfMessage = new Messenger().messageFromElves();
|
LetterComposite elfMessage = new Messenger().messageFromElves();
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>composite</artifactId>
|
<artifactId>composite</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>cqrs</artifactId>
|
<artifactId>cqrs</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>dao</artifactId>
|
<artifactId>dao</artifactId>
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>data-transfer-object</artifactId>
|
<artifactId>data-transfer-object</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -36,7 +36,7 @@ Wikipedia says
|
|||||||
|
|
||||||
Let's take the troll example. First of all we have a simple troll implementing the troll interface
|
Let's take the troll example. First of all we have a simple troll implementing the troll interface
|
||||||
|
|
||||||
```
|
```java
|
||||||
public interface Troll {
|
public interface Troll {
|
||||||
void attack();
|
void attack();
|
||||||
int getAttackPower();
|
int getAttackPower();
|
||||||
@ -66,7 +66,7 @@ public class SimpleTroll implements Troll {
|
|||||||
|
|
||||||
Next we want to add club for the troll. We can do it dynamically by using a decorator
|
Next we want to add club for the troll. We can do it dynamically by using a decorator
|
||||||
|
|
||||||
```
|
```java
|
||||||
public class ClubbedTroll implements Troll {
|
public class ClubbedTroll implements Troll {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(ClubbedTroll.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(ClubbedTroll.class);
|
||||||
@ -97,7 +97,7 @@ public class ClubbedTroll implements Troll {
|
|||||||
|
|
||||||
Here's the troll in action
|
Here's the troll in action
|
||||||
|
|
||||||
```
|
```java
|
||||||
// simple troll
|
// simple troll
|
||||||
Troll troll = new SimpleTroll();
|
Troll troll = new SimpleTroll();
|
||||||
troll.attack(); // The troll tries to grab you!
|
troll.attack(); // The troll tries to grab you!
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>decorator</artifactId>
|
<artifactId>decorator</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>dependency-injection</artifactId>
|
<artifactId>dependency-injection</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>double-checked-locking</artifactId>
|
<artifactId>double-checked-locking</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>double-dispatch</artifactId>
|
<artifactId>double-dispatch</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>event-aggregator</artifactId>
|
<artifactId>event-aggregator</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>event-asynchronous</artifactId>
|
<artifactId>event-asynchronous</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>event-driven-architecture</artifactId>
|
<artifactId>event-driven-architecture</artifactId>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>event-queue</artifactId>
|
<artifactId>event-queue</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>event-sourcing</artifactId>
|
<artifactId>event-sourcing</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>execute-around</artifactId>
|
<artifactId>execute-around</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ Wikipedia says
|
|||||||
|
|
||||||
Taking our goldmine example from above. Here we have the dwarven mine worker hierarchy
|
Taking our goldmine example from above. Here we have the dwarven mine worker hierarchy
|
||||||
|
|
||||||
```
|
```java
|
||||||
public abstract class DwarvenMineWorker {
|
public abstract class DwarvenMineWorker {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(DwarvenMineWorker.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(DwarvenMineWorker.class);
|
||||||
@ -140,7 +140,7 @@ public class DwarvenCartOperator extends DwarvenMineWorker {
|
|||||||
|
|
||||||
To operate all these goldmine workers we have the facade
|
To operate all these goldmine workers we have the facade
|
||||||
|
|
||||||
```
|
```java
|
||||||
public class DwarvenGoldmineFacade {
|
public class DwarvenGoldmineFacade {
|
||||||
|
|
||||||
private final List<DwarvenMineWorker> workers;
|
private final List<DwarvenMineWorker> workers;
|
||||||
@ -175,7 +175,7 @@ public class DwarvenGoldmineFacade {
|
|||||||
|
|
||||||
Now to use the facade
|
Now to use the facade
|
||||||
|
|
||||||
```
|
```java
|
||||||
DwarvenGoldmineFacade facade = new DwarvenGoldmineFacade();
|
DwarvenGoldmineFacade facade = new DwarvenGoldmineFacade();
|
||||||
facade.startNewDay();
|
facade.startNewDay();
|
||||||
// Dwarf gold digger wakes up.
|
// Dwarf gold digger wakes up.
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>facade</artifactId>
|
<artifactId>facade</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>factory-kit</artifactId>
|
<artifactId>factory-kit</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -35,7 +35,7 @@ Wikipedia says
|
|||||||
|
|
||||||
Taking our blacksmith example above. First of all we have a blacksmith interface and some implementations for it
|
Taking our blacksmith example above. First of all we have a blacksmith interface and some implementations for it
|
||||||
|
|
||||||
```
|
```java
|
||||||
public interface Blacksmith {
|
public interface Blacksmith {
|
||||||
Weapon manufactureWeapon(WeaponType weaponType);
|
Weapon manufactureWeapon(WeaponType weaponType);
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ public class OrcBlacksmith implements Blacksmith {
|
|||||||
|
|
||||||
Now as the customers come the correct type of blacksmith is summoned and requested weapons are manufactured
|
Now as the customers come the correct type of blacksmith is summoned and requested weapons are manufactured
|
||||||
|
|
||||||
```
|
```java
|
||||||
Blacksmith blacksmith = new ElfBlacksmith();
|
Blacksmith blacksmith = new ElfBlacksmith();
|
||||||
blacksmith.manufactureWeapon(WeaponType.SPEAR);
|
blacksmith.manufactureWeapon(WeaponType.SPEAR);
|
||||||
blacksmith.manufactureWeapon(WeaponType.AXE);
|
blacksmith.manufactureWeapon(WeaponType.AXE);
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>factory-method</artifactId>
|
<artifactId>factory-method</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>flux</artifactId>
|
<artifactId>flux</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -32,7 +32,7 @@ Wikipedia says
|
|||||||
|
|
||||||
Translating our alchemist shop example from above. First of all we have different potion types
|
Translating our alchemist shop example from above. First of all we have different potion types
|
||||||
|
|
||||||
```
|
```java
|
||||||
public interface Potion {
|
public interface Potion {
|
||||||
void drink();
|
void drink();
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ public class InvisibilityPotion implements Potion {
|
|||||||
|
|
||||||
Then the actual Flyweight object which is the factory for creating potions
|
Then the actual Flyweight object which is the factory for creating potions
|
||||||
|
|
||||||
```
|
```java
|
||||||
public class PotionFactory {
|
public class PotionFactory {
|
||||||
|
|
||||||
private final Map<PotionType, Potion> potions;
|
private final Map<PotionType, Potion> potions;
|
||||||
@ -100,7 +100,7 @@ public class PotionFactory {
|
|||||||
|
|
||||||
And it can be used as below
|
And it can be used as below
|
||||||
|
|
||||||
```
|
```java
|
||||||
PotionFactory factory = new PotionFactory();
|
PotionFactory factory = new PotionFactory();
|
||||||
factory.createPotion(PotionType.INVISIBILITY).drink(); // You become invisible. (Potion=6566818)
|
factory.createPotion(PotionType.INVISIBILITY).drink(); // You become invisible. (Potion=6566818)
|
||||||
factory.createPotion(PotionType.HEALING).drink(); // You feel healed. (Potion=648129364)
|
factory.createPotion(PotionType.HEALING).drink(); // You feel healed. (Potion=648129364)
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>flyweight</artifactId>
|
<artifactId>flyweight</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>front-controller</artifactId>
|
<artifactId>front-controller</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<artifactId>guarded-suspension</artifactId>
|
<artifactId>guarded-suspension</artifactId>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>half-sync-half-async</artifactId>
|
<artifactId>half-sync-half-async</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>hexagonal</artifactId>
|
<artifactId>hexagonal</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>intercepting-filter</artifactId>
|
<artifactId>intercepting-filter</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>interpreter</artifactId>
|
<artifactId>interpreter</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>iterator</artifactId>
|
<artifactId>iterator</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>com.iluwatar.layers</groupId>
|
<groupId>com.iluwatar.layers</groupId>
|
||||||
<artifactId>layers</artifactId>
|
<artifactId>layers</artifactId>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>lazy-loading</artifactId>
|
<artifactId>lazy-loading</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>mediator</artifactId>
|
<artifactId>mediator</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>memento</artifactId>
|
<artifactId>memento</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>message-channel</artifactId>
|
<artifactId>message-channel</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>model-view-controller</artifactId>
|
<artifactId>model-view-controller</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>model-view-presenter</artifactId>
|
<artifactId>model-view-presenter</artifactId>
|
||||||
<name>model-view-presenter</name>
|
<name>model-view-presenter</name>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>module</artifactId>
|
<artifactId>module</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>monad</artifactId>
|
<artifactId>monad</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -50,7 +50,7 @@ public class App {
|
|||||||
/**
|
/**
|
||||||
* Program entry point.
|
* Program entry point.
|
||||||
*
|
*
|
||||||
* @param args @param args command line args
|
* @param args command line args
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
User user = new User("user", 24, Sex.FEMALE, "foobar.com");
|
User user = new User("user", 24, Sex.FEMALE, "foobar.com");
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>monostate</artifactId>
|
<artifactId>monostate</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>multiton</artifactId>
|
<artifactId>multiton</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>mute-idiom</artifactId>
|
<artifactId>mute-idiom</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>mutex</artifactId>
|
<artifactId>mutex</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>naked-objects</artifactId>
|
<artifactId>naked-objects</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>naked-objects-dom</artifactId>
|
<artifactId>naked-objects-dom</artifactId>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>naked-objects</artifactId>
|
<artifactId>naked-objects</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>naked-objects-fixture</artifactId>
|
<artifactId>naked-objects-fixture</artifactId>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>naked-objects</artifactId>
|
<artifactId>naked-objects</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>naked-objects-integtests</artifactId>
|
<artifactId>naked-objects-integtests</artifactId>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>naked-objects</artifactId>
|
<artifactId>naked-objects</artifactId>
|
||||||
@ -350,17 +350,17 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${project.groupId}</groupId>
|
<groupId>${project.groupId}</groupId>
|
||||||
<artifactId>naked-objects-dom</artifactId>
|
<artifactId>naked-objects-dom</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${project.groupId}</groupId>
|
<groupId>${project.groupId}</groupId>
|
||||||
<artifactId>naked-objects-fixture</artifactId>
|
<artifactId>naked-objects-fixture</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${project.groupId}</groupId>
|
<groupId>${project.groupId}</groupId>
|
||||||
<artifactId>naked-objects-webapp</artifactId>
|
<artifactId>naked-objects-webapp</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>naked-objects</artifactId>
|
<artifactId>naked-objects</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>naked-objects-webapp</artifactId>
|
<artifactId>naked-objects-webapp</artifactId>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>null-object</artifactId>
|
<artifactId>null-object</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>object-mother</artifactId>
|
<artifactId>object-mother</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>object-pool</artifactId>
|
<artifactId>object-pool</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>observer</artifactId>
|
<artifactId>observer</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>page-object</artifactId>
|
<artifactId>page-object</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>poison-pill</artifactId>
|
<artifactId>poison-pill</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
2
pom.xml
2
pom.xml
@ -21,7 +21,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<inceptionYear>2014</inceptionYear>
|
<inceptionYear>2014</inceptionYear>
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>private-class-data</artifactId>
|
<artifactId>private-class-data</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>producer-consumer</artifactId>
|
<artifactId>producer-consumer</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>promise</artifactId>
|
<artifactId>promise</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.19.0-SNAPSHOT</version>
|
<version>1.20.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>property</artifactId>
|
<artifactId>property</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user