Compare commits

...

11 Commits

Author SHA1 Message Date
339dacc01c Addressing review comments, Deleting unintentional file and used FAILURE constant in ClientTest as well 2018-10-15 21:16:00 +05:30
ac3cdfbf35 1) Updated test cases to use Junit Assert method as compared to assert keyword 2) Proper testing of RemoteService using RandomProvider interface. Introduced RandomProvider interface so that randomness can be controlled from test cases. 3) For readability used constant for representing FAILURE 2018-10-15 20:16:04 +05:30
db33cc533b Remove CII best practices badge 2018-10-13 18:40:10 +03:00
8433c7b712 Merge pull request from andrievsky/master
Fix redundant list alloc in LotteryNumbers
2018-10-13 18:28:40 +03:00
ee74fec53c Fix pattern title 2018-09-30 21:36:32 +03:00
7a7e891384 Set version for next development iteration 2018-09-30 21:05:57 +03:00
26d6d96f78 Reach milestone 1.20.0 2018-09-30 21:03:48 +03:00
3cec7a9ec1 Merge pull request from LyndonArmitage/module-ignore-test-output
Delete & Ignore output.txt & error.txt
2018-09-25 22:49:25 +03:00
b079aec1fd Merge pull request from iluwatar/Issue781
 Resolved ClasscastException from Acyclic Visitor
2018-09-25 22:45:25 +03:00
8f53df91b9 Delete & Ignore output.txt & error.txt
Both output.txt and error.txt are produced by tests.
Each file contained a header that was overridden upon executing said
tests causing tracked files to be changed.

Added them to a local .gitignore file for this module.
2018-09-24 10:08:02 +01:00
1d12d94bac Fix redundant list alloc in LotteryNumbers 2018-09-11 11:55:53 +02:00
133 changed files with 195 additions and 191 deletions
README.md
abstract-document
abstract-factory
acyclic-visitor
adapter
aggregator-microservices
aggregator-service
information-microservice
inventory-microservice
pom.xml
ambassador
api-gateway
api-gateway-service
image-microservice
pom.xml
price-microservice
async-method-invocation
balking
bridge
builder
business-delegate
caching
callback
chain
collection-pipeline
command
composite
converter
cqrs
dao
data-bus
data-mapper
data-transfer-object
decorator
delegation
dependency-injection
dirty-flag
double-checked-locking
double-dispatch
eip-aggregator
eip-message-channel
eip-publish-subscribe
eip-splitter
eip-wire-tap
event-aggregator
event-asynchronous
event-driven-architecture
event-queue
event-sourcing
execute-around
extension-objects
facade
factory-kit
factory-method
feature-toggle
fluentinterface
flux
flyweight
front-controller
guarded-suspension
half-sync-half-async
hexagonal
pom.xml
src
main
java
com
iluwatar
hexagonal
intercepting-filter
interpreter
iterator
layers
lazy-loading
marker
mediator
memento
model-view-controller
model-view-presenter
module
monad
monostate
multiton
mute-idiom
mutex
naked-objects
dom
fixture
integtests
pom.xml
webapp
null-object
object-mother
object-pool
observer
page-object
partial-response
poison-pill
pom.xml
private-class-data
producer-consumer
promise
property
prototype
proxy
queue-load-leveling
reactor
reader-writer-lock
repository
resource-acquisition-is-initialization
retry
semaphore
servant
serverless
service-layer
service-locator
singleton
specification
state
step-builder
strategy
template-method
thread-pool
throttling
tls
tolerant-reader
trampoline
twin
unit-of-work
value-object
visitor

@ -8,7 +8,6 @@
[![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/iluwatar/java-design-patterns/master/LICENSE.md) [![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/iluwatar/java-design-patterns/master/LICENSE.md)
[![Join the chat at https://gitter.im/iluwatar/java-design-patterns](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/iluwatar/java-design-patterns?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Join the chat at https://gitter.im/iluwatar/java-design-patterns](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/iluwatar/java-design-patterns?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=com.iluwatar%3Ajava-design-patterns&metric=alert_status)](https://sonarcloud.io/dashboard/index/com.iluwatar%3Ajava-design-patterns) [![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=com.iluwatar%3Ajava-design-patterns&metric=alert_status)](https://sonarcloud.io/dashboard/index/com.iluwatar%3Ajava-design-patterns)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1503/badge)](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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>abstract-document</artifactId> <artifactId>abstract-document</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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>abstract-factory</artifactId> <artifactId>abstract-factory</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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>acyclic-visitor</artifactId> <artifactId>acyclic-visitor</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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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>java-design-patterns</artifactId> <artifactId>java-design-patterns</artifactId>
<groupId>com.iluwatar</groupId> <groupId>com.iluwatar</groupId>
<version>1.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>ambassador</artifactId> <artifactId>ambassador</artifactId>

@ -22,6 +22,7 @@
*/ */
package com.iluwatar.ambassador; package com.iluwatar.ambassador;
import com.iluwatar.ambassador.util.RandomProvider;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -31,9 +32,10 @@ import static java.lang.Thread.sleep;
* A remote legacy application represented by a Singleton implementation. * A remote legacy application represented by a Singleton implementation.
*/ */
public class RemoteService implements RemoteServiceInterface { public class RemoteService implements RemoteServiceInterface {
static final int THRESHOLD = 200;
private static final Logger LOGGER = LoggerFactory.getLogger(RemoteService.class); private static final Logger LOGGER = LoggerFactory.getLogger(RemoteService.class);
private static RemoteService service = null; private static RemoteService service = null;
private final RandomProvider randomProvider;
static synchronized RemoteService getRemoteService() { static synchronized RemoteService getRemoteService() {
if (service == null) { if (service == null) {
@ -42,24 +44,33 @@ public class RemoteService implements RemoteServiceInterface {
return service; return service;
} }
private RemoteService() {} private RemoteService() {
this(Math::random);
}
/**
* This constuctor is used for testing purposes only.
*/
RemoteService(RandomProvider randomProvider) {
this.randomProvider = randomProvider;
}
/** /**
* Remote function takes a value and multiplies it by 10 taking a random amount of time. * Remote function takes a value and multiplies it by 10 taking a random amount of time.
* Will sometimes return -1. This imitates connectivity issues a client might have to account for. * Will sometimes return -1. This imitates connectivity issues a client might have to account for.
* @param value integer value to be multiplied. * @param value integer value to be multiplied.
* @return if waitTime is more than 200ms, it returns value * 10, otherwise -1. * @return if waitTime is less than {@link RemoteService#THRESHOLD}, it returns value * 10,
* otherwise {@link RemoteServiceInterface#FAILURE}.
*/ */
@Override @Override
public long doRemoteFunction(int value) { public long doRemoteFunction(int value) {
long waitTime = (long) Math.floor(Math.random() * 1000); long waitTime = (long) Math.floor(randomProvider.random() * 1000);
try { try {
sleep(waitTime); sleep(waitTime);
} catch (InterruptedException e) { } catch (InterruptedException e) {
LOGGER.error("Thread sleep state interrupted", e); LOGGER.error("Thread sleep state interrupted", e);
} }
return waitTime >= 200 ? value * 10 : -1; return waitTime <= THRESHOLD ? value * 10 : FAILURE;
} }
} }

@ -26,6 +26,7 @@ package com.iluwatar.ambassador;
* Interface shared by ({@link RemoteService}) and ({@link ServiceAmbassador}). * Interface shared by ({@link RemoteService}) and ({@link ServiceAmbassador}).
*/ */
interface RemoteServiceInterface { interface RemoteServiceInterface {
int FAILURE = -1;
long doRemoteFunction(int value) throws Exception; long doRemoteFunction(int value) throws Exception;
} }

@ -59,15 +59,15 @@ public class ServiceAmbassador implements RemoteServiceInterface {
private long safeCall(int value) { private long safeCall(int value) {
int retries = 0; int retries = 0;
long result = -1; long result = FAILURE;
for (int i = 0; i < RETRIES; i++) { for (int i = 0; i < RETRIES; i++) {
if (retries >= RETRIES) { if (retries >= RETRIES) {
return -1; return FAILURE;
} }
if ((result = checkLatency(value)) == -1) { if ((result = checkLatency(value)) == FAILURE) {
LOGGER.info("Failed to reach remote: (" + (i + 1) + ")"); LOGGER.info("Failed to reach remote: (" + (i + 1) + ")");
retries++; retries++;
try { try {

@ -0,0 +1,8 @@
package com.iluwatar.ambassador.util;
/**
* An interface for randomness. Useful for testing purposes.
*/
public interface RandomProvider {
double random();
}

@ -24,6 +24,8 @@ package com.iluwatar.ambassador;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
/** /**
* Test for {@link Client} * Test for {@link Client}
*/ */
@ -35,6 +37,6 @@ public class ClientTest {
Client client = new Client(); Client client = new Client();
long result = client.useService(10); long result = client.useService(10);
assert result == 100 || result == -1; assertTrue(result == 100 || result == RemoteService.FAILURE);
} }
} }

@ -22,16 +22,43 @@
*/ */
package com.iluwatar.ambassador; package com.iluwatar.ambassador;
import com.iluwatar.ambassador.util.RandomProvider;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
/** /**
* Test for {@link RemoteService} * Test for {@link RemoteService}
*/ */
public class RemoteServiceTest { public class RemoteServiceTest {
@Test @Test
public void test() { public void testFailedCall() {
long result = RemoteService.getRemoteService().doRemoteFunction(10); RemoteService remoteService = new RemoteService(
assert result == 100 || result == -1; new StaticRandomProvider(0.21));
long result = remoteService.doRemoteFunction(10);
assertEquals(RemoteServiceInterface.FAILURE, result);
}
@Test
public void testSuccessfulCall() {
RemoteService remoteService = new RemoteService(
new StaticRandomProvider(0.2));
long result = remoteService.doRemoteFunction(10);
assertEquals(100, result);
}
private class StaticRandomProvider implements RandomProvider {
private double value;
StaticRandomProvider(double value) {
this.value = value;
}
@Override
public double random() {
return value;
}
} }
} }

@ -24,6 +24,8 @@ package com.iluwatar.ambassador;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
/** /**
* Test for {@link ServiceAmbassador} * Test for {@link ServiceAmbassador}
*/ */
@ -32,6 +34,6 @@ public class ServiceAmbassadorTest {
@Test @Test
public void test() { public void test() {
long result = new ServiceAmbassador().doRemoteFunction(10); long result = new ServiceAmbassador().doRemoteFunction(10);
assert result == 100 || result == -1; assertTrue(result == 100 || result == RemoteServiceInterface.FAILURE);
} }
} }

@ -29,7 +29,7 @@
<parent> <parent>
<artifactId>api-gateway</artifactId> <artifactId>api-gateway</artifactId>
<groupId>com.iluwatar</groupId> <groupId>com.iluwatar</groupId>
<version>1.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>bridge</artifactId> <artifactId>bridge</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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>callback</artifactId> <artifactId>callback</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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>chain</artifactId> <artifactId>chain</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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>collection-pipeline</artifactId> <artifactId>collection-pipeline</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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>command</artifactId> <artifactId>command</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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>data-transfer-object</artifactId> <artifactId>data-transfer-object</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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>dependency-injection</artifactId> <artifactId>dependency-injection</artifactId>
<dependencies> <dependencies>

@ -29,11 +29,11 @@
<parent> <parent>
<groupId>com.iluwatar</groupId> <groupId>com.iluwatar</groupId>
<artifactId>java-design-patterns</artifactId> <artifactId>java-design-patterns</artifactId>
<version>1.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<groupId>com.iluwatar</groupId> <groupId>com.iluwatar</groupId>
<artifactId>dirty-flag</artifactId> <artifactId>dirty-flag</artifactId>
<version>1.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</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>
<groupId>com.iluwatar</groupId> <groupId>com.iluwatar</groupId>
<artifactId>java-design-patterns</artifactId> <artifactId>java-design-patterns</artifactId>
<version>1.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>eip-publish-subscribe</artifactId> <artifactId>eip-publish-subscribe</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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>factory-kit</artifactId> <artifactId>factory-kit</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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>flux</artifactId> <artifactId>flux</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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>hexagonal</artifactId> <artifactId>hexagonal</artifactId>
<dependencies> <dependencies>

@ -22,13 +22,12 @@
*/ */
package com.iluwatar.hexagonal.domain; package com.iluwatar.hexagonal.domain;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.List;
import java.util.PrimitiveIterator; import java.util.PrimitiveIterator;
import java.util.Random; import java.util.Random;
import java.util.Set; import java.util.Set;
import java.util.Iterator;
/** /**
* *
@ -85,11 +84,10 @@ public class LotteryNumbers {
* @return numbers as comma separated string * @return numbers as comma separated string
*/ */
public String getNumbersAsString() { public String getNumbersAsString() {
List<Integer> list = new ArrayList<>();
list.addAll(numbers);
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
Iterator<Integer> iterator = numbers.iterator();
for (int i = 0; i < NUM_NUMBERS; i++) { for (int i = 0; i < NUM_NUMBERS; i++) {
builder.append(list.get(i)); builder.append(iterator.next());
if (i < NUM_NUMBERS - 1) { if (i < NUM_NUMBERS - 1) {
builder.append(","); builder.append(",");
} }

@ -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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>memento</artifactId> <artifactId>memento</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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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>

2
module/.gitignore vendored Normal file

@ -0,0 +1,2 @@
error.txt
output.txt

@ -1,23 +0,0 @@
====
The MIT License
Copyright (c) 2014 Ilkka Seppälä
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
====

@ -1,23 +0,0 @@
====
The MIT License
Copyright (c) 2014 Ilkka Seppälä
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
====

@ -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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>monad</artifactId> <artifactId>monad</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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>poison-pill</artifactId> <artifactId>poison-pill</artifactId>
<dependencies> <dependencies>

@ -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.20.0-SNAPSHOT</version> <version>1.21.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<inceptionYear>2014</inceptionYear> <inceptionYear>2014</inceptionYear>
<properties> <properties>

Some files were not shown because too many files have changed in this diff Show More