Compare commits

..

8 Commits

127 changed files with 192 additions and 174 deletions

View File

@ -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

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>abstract-document</artifactId> <artifactId>abstract-document</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>abstract-factory</artifactId> <artifactId>abstract-factory</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>acyclic-visitor</artifactId> <artifactId>acyclic-visitor</artifactId>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>adapter</artifactId> <artifactId>adapter</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -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</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>

View File

@ -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</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>

View File

@ -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</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>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -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</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>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>async-method-invocation</artifactId> <artifactId>async-method-invocation</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>bridge</artifactId> <artifactId>bridge</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>builder</artifactId> <artifactId>builder</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>business-delegate</artifactId> <artifactId>business-delegate</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>caching</artifactId> <artifactId>caching</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>callback</artifactId> <artifactId>callback</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>chain</artifactId> <artifactId>chain</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>collection-pipeline</artifactId> <artifactId>collection-pipeline</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>command</artifactId> <artifactId>command</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>composite</artifactId> <artifactId>composite</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>cqrs</artifactId> <artifactId>cqrs</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>dao</artifactId> <artifactId>dao</artifactId>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>data-bus</artifactId> <artifactId>data-bus</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>data-mapper</artifactId> <artifactId>data-mapper</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>data-transfer-object</artifactId> <artifactId>data-transfer-object</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>decorator</artifactId> <artifactId>decorator</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>dependency-injection</artifactId> <artifactId>dependency-injection</artifactId>
<dependencies> <dependencies>

View File

@ -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</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</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>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>double-checked-locking</artifactId> <artifactId>double-checked-locking</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>double-dispatch</artifactId> <artifactId>double-dispatch</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>eip-message-channel</artifactId> <artifactId>eip-message-channel</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>eip-publish-subscribe</artifactId> <artifactId>eip-publish-subscribe</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>event-aggregator</artifactId> <artifactId>event-aggregator</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>event-asynchronous</artifactId> <artifactId>event-asynchronous</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>event-driven-architecture</artifactId> <artifactId>event-driven-architecture</artifactId>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>event-queue</artifactId> <artifactId>event-queue</artifactId>
<dependencies> <dependencies>

View File

@ -47,13 +47,15 @@ public class App {
* @throws IOException when there is a problem with the audio file loading * @throws IOException when there is a problem with the audio file loading
* @throws UnsupportedAudioFileException when the loaded audio file is unsupported * @throws UnsupportedAudioFileException when the loaded audio file is unsupported
*/ */
public static void main(String[] args) throws UnsupportedAudioFileException, IOException { public static void main(String[] args) throws UnsupportedAudioFileException, IOException, InterruptedException {
Audio.playSound(Audio.getAudioStream("./etc/Bass-Drum-1.wav"), -10.0f); Audio audio = Audio.getInstance();
Audio.playSound(Audio.getAudioStream("./etc/Closed-Hi-Hat-1.wav"), -8.0f); audio.playSound(audio.getAudioStream("./etc/Bass-Drum-1.wav"), -10.0f);
audio.playSound(audio.getAudioStream("./etc/Closed-Hi-Hat-1.wav"), -8.0f);
System.out.println("Press Enter key to stop the program..."); System.out.println("Press Enter key to stop the program...");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
br.read(); br.read();
Audio.stopService(); }
audio.stopService();
} }
} }

View File

@ -23,6 +23,9 @@
package com.iluwatar.event.queue; package com.iluwatar.event.queue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@ -38,49 +41,56 @@ import javax.sound.sampled.UnsupportedAudioFileException;
* *
*/ */
public class Audio { public class Audio {
private static final Logger LOGGER = LoggerFactory.getLogger(Audio.class);
private static final Audio INSTANCE = new Audio();
private static final int MAX_PENDING = 16; private static final int MAX_PENDING = 16;
private static int headIndex; private int headIndex;
private static int tailIndex; private int tailIndex;
private static Thread updateThread = null; private volatile Thread updateThread = null;
private static PlayMessage[] pendingAudio = new PlayMessage[MAX_PENDING]; private PlayMessage[] pendingAudio = new PlayMessage[MAX_PENDING];
// Visible only for testing purposes
Audio() {
}
public static Audio getInstance() {
return INSTANCE;
}
/** /**
* This method stops the Update Method's thread. * This method stops the Update Method's thread and waits till service stops.
*/ */
public static synchronized void stopService() { public synchronized void stopService() throws InterruptedException {
if (updateThread != null) { if (updateThread != null) {
updateThread.interrupt(); updateThread.interrupt();
} }
updateThread.join();
updateThread = null;
} }
/** /**
* This method check the Update Method's thread is started. * This method check the Update Method's thread is started.
* @return boolean * @return boolean
*/ */
public static synchronized boolean isServiceRunning() { public synchronized boolean isServiceRunning() {
if (updateThread != null && updateThread.isAlive() ) { return updateThread != null && updateThread.isAlive();
return true;
} else {
return false;
}
} }
/** /**
* Starts the thread for the Update Method pattern if it was not started previously. * Starts the thread for the Update Method pattern if it was not started previously.
* Also when the thread is is ready initializes the indexes of the queue * Also when the thread is is ready initializes the indexes of the queue
*/ */
public static void init() { public void init() {
if (updateThread == null) { if (updateThread == null) {
updateThread = new Thread(new Runnable() { updateThread = new Thread(() -> {
public void run() {
while (!Thread.currentThread().isInterrupted()) { while (!Thread.currentThread().isInterrupted()) {
Audio.update(); update();
}
} }
}); });
} }
@ -90,7 +100,7 @@ public class Audio {
/** /**
* This is a synchronized thread starter * This is a synchronized thread starter
*/ */
public static synchronized void startThread() { private synchronized void startThread() {
if (!updateThread.isAlive()) { if (!updateThread.isAlive()) {
updateThread.start(); updateThread.start();
headIndex = 0; headIndex = 0;
@ -103,7 +113,7 @@ public class Audio {
* @param stream is the AudioInputStream for the method * @param stream is the AudioInputStream for the method
* @param volume is the level of the audio's volume * @param volume is the level of the audio's volume
*/ */
public static void playSound(AudioInputStream stream, float volume) { public void playSound(AudioInputStream stream, float volume) {
init(); init();
// Walk the pending requests. // Walk the pending requests.
for (int i = headIndex; i != tailIndex; i = (i + 1) % MAX_PENDING) { for (int i = headIndex; i != tailIndex; i = (i + 1) % MAX_PENDING) {
@ -123,7 +133,7 @@ public class Audio {
* This method uses the Update Method pattern. * This method uses the Update Method pattern.
* It takes the audio from the queue and plays it * It takes the audio from the queue and plays it
*/ */
public static void update() { private void update() {
// If there are no pending requests, do nothing. // If there are no pending requests, do nothing.
if (headIndex == tailIndex) { if (headIndex == tailIndex) {
return; return;
@ -136,13 +146,11 @@ public class Audio {
clip.open(audioStream); clip.open(audioStream);
clip.start(); clip.start();
} catch (LineUnavailableException e) { } catch (LineUnavailableException e) {
System.err.println("Error occoured while loading the audio: The line is unavailable"); LOGGER.trace("Error occoured while loading the audio: The line is unavailable", e);
e.printStackTrace();
} catch (IOException e) { } catch (IOException e) {
System.err.println("Input/Output error while loading the audio"); LOGGER.trace("Input/Output error while loading the audio", e);
e.printStackTrace();
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
System.err.println("The system doesn't support the sound: " + e.getMessage()); LOGGER.trace("The system doesn't support the sound: " + e.getMessage(), e);
} }
} }
@ -153,7 +161,7 @@ public class Audio {
* @throws UnsupportedAudioFileException when the audio file is not supported * @throws UnsupportedAudioFileException when the audio file is not supported
* @throws IOException when the file is not readable * @throws IOException when the file is not readable
*/ */
public static AudioInputStream getAudioStream(String filePath) public AudioInputStream getAudioStream(String filePath)
throws UnsupportedAudioFileException, IOException { throws UnsupportedAudioFileException, IOException {
return AudioSystem.getAudioInputStream(new File(filePath).getAbsoluteFile()); return AudioSystem.getAudioInputStream(new File(filePath).getAbsoluteFile());
} }
@ -162,7 +170,7 @@ public class Audio {
* Returns with the message array of the queue * Returns with the message array of the queue
* @return PlayMessage[] * @return PlayMessage[]
*/ */
public static PlayMessage[] getPendingAudio() { public PlayMessage[] getPendingAudio() {
return pendingAudio; return pendingAudio;
} }

View File

@ -23,6 +23,7 @@
package com.iluwatar.event.queue; package com.iluwatar.event.queue;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import javax.sound.sampled.UnsupportedAudioFileException; import javax.sound.sampled.UnsupportedAudioFileException;
@ -39,6 +40,12 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/ */
public class AudioTest { public class AudioTest {
private Audio audio;
@BeforeEach
void createAudioInstance() {
audio = new Audio();
}
/** /**
* Test here that the playSound method works correctly * Test here that the playSound method works correctly
* @throws UnsupportedAudioFileException when the audio file is not supported * @throws UnsupportedAudioFileException when the audio file is not supported
@ -47,13 +54,15 @@ public class AudioTest {
*/ */
@Test @Test
public void testPlaySound() throws UnsupportedAudioFileException, IOException, InterruptedException { public void testPlaySound() throws UnsupportedAudioFileException, IOException, InterruptedException {
Audio.playSound(Audio.getAudioStream("./etc/Bass-Drum-1.wav"), -10.0f); audio.playSound(audio.getAudioStream("./etc/Bass-Drum-1.wav"), -10.0f);
// test that service is started // test that service is started
assertTrue(Audio.isServiceRunning()); assertTrue(audio.isServiceRunning());
// adding a small pause to be sure that the sound is ended // adding a small pause to be sure that the sound is ended
Thread.sleep(5000); Thread.sleep(5000);
audio.stopService();
// test that service is finished // test that service is finished
assertFalse(!Audio.isServiceRunning()); assertFalse(audio.isServiceRunning());
} }
/** /**
@ -64,16 +73,18 @@ public class AudioTest {
*/ */
@Test @Test
public void testQueue() throws UnsupportedAudioFileException, IOException, InterruptedException { public void testQueue() throws UnsupportedAudioFileException, IOException, InterruptedException {
Audio.playSound(Audio.getAudioStream("./etc/Bass-Drum-1.aif"), -10.0f); audio.playSound(audio.getAudioStream("./etc/Bass-Drum-1.aif"), -10.0f);
Audio.playSound(Audio.getAudioStream("./etc/Bass-Drum-1.aif"), -10.0f); audio.playSound(audio.getAudioStream("./etc/Bass-Drum-1.aif"), -10.0f);
Audio.playSound(Audio.getAudioStream("./etc/Bass-Drum-1.aif"), -10.0f); audio.playSound(audio.getAudioStream("./etc/Bass-Drum-1.aif"), -10.0f);
assertTrue(Audio.getPendingAudio().length > 0); assertTrue(audio.getPendingAudio().length > 0);
// test that service is started // test that service is started
assertTrue(Audio.isServiceRunning()); assertTrue(audio.isServiceRunning());
// adding a small pause to be sure that the sound is ended // adding a small pause to be sure that the sound is ended
Thread.sleep(10000); Thread.sleep(10000);
audio.stopService();
// test that service is finished // test that service is finished
assertFalse(!Audio.isServiceRunning()); assertFalse(audio.isServiceRunning());
} }
} }

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>event-sourcing</artifactId> <artifactId>event-sourcing</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>execute-around</artifactId> <artifactId>execute-around</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>facade</artifactId> <artifactId>facade</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>factory-kit</artifactId> <artifactId>factory-kit</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>factory-method</artifactId> <artifactId>factory-method</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>flux</artifactId> <artifactId>flux</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>flyweight</artifactId> <artifactId>flyweight</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>front-controller</artifactId> <artifactId>front-controller</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<packaging>jar</packaging> <packaging>jar</packaging>
<artifactId>guarded-suspension</artifactId> <artifactId>guarded-suspension</artifactId>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>half-sync-half-async</artifactId> <artifactId>half-sync-half-async</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>hexagonal</artifactId> <artifactId>hexagonal</artifactId>
<dependencies> <dependencies>

View File

@ -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(",");
} }

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>intercepting-filter</artifactId> <artifactId>intercepting-filter</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>interpreter</artifactId> <artifactId>interpreter</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>iterator</artifactId> <artifactId>iterator</artifactId>
<dependencies> <dependencies>

View File

@ -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</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>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>lazy-loading</artifactId> <artifactId>lazy-loading</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>mediator</artifactId> <artifactId>mediator</artifactId>
<dependencies> <dependencies>

View File

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

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>model-view-controller</artifactId> <artifactId>model-view-controller</artifactId>
<dependencies> <dependencies>

View File

@ -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</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>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>module</artifactId> <artifactId>module</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>monad</artifactId> <artifactId>monad</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>monostate</artifactId> <artifactId>monostate</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>multiton</artifactId> <artifactId>multiton</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>mute-idiom</artifactId> <artifactId>mute-idiom</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>mutex</artifactId> <artifactId>mutex</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>naked-objects-dom</artifactId> <artifactId>naked-objects-dom</artifactId>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>naked-objects-fixture</artifactId> <artifactId>naked-objects-fixture</artifactId>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>naked-objects-integtests</artifactId> <artifactId>naked-objects-integtests</artifactId>

View File

@ -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</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</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</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</version> <version>1.21.0-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>naked-objects-webapp</artifactId> <artifactId>naked-objects-webapp</artifactId>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>null-object</artifactId> <artifactId>null-object</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>object-mother</artifactId> <artifactId>object-mother</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>object-pool</artifactId> <artifactId>object-pool</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>observer</artifactId> <artifactId>observer</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>page-object</artifactId> <artifactId>page-object</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

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

View File

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

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>private-class-data</artifactId> <artifactId>private-class-data</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>producer-consumer</artifactId> <artifactId>producer-consumer</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>promise</artifactId> <artifactId>promise</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>property</artifactId> <artifactId>property</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>prototype</artifactId> <artifactId>prototype</artifactId>
<dependencies> <dependencies>

View File

@ -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</version> <version>1.21.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>proxy</artifactId> <artifactId>proxy</artifactId>
<dependencies> <dependencies>

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