diff --git a/README.md b/README.md
index 4724ea332..1e0a77c04 100644
--- a/README.md
+++ b/README.md
@@ -6,26 +6,23 @@
[](https://gitter.im/iluwatar/java-design-patterns?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
- [](https://coveralls.io/r/iluwatar/java-design-patterns?branch=master)
+[](https://travis-ci.org/iluwatar/java-design-patterns) [](https://coveralls.io/r/iluwatar/java-design-patterns?branch=master)
-#### Browse and view all of the patterns on our Website: [iluwatar.github.io/java-design-patterns/](https://iluwatar.github.io/java-design-patterns/)
-
# Table of Contents
- Introduction
+ - How to contribute
- Frequently Asked Questions
- - How to contribute
- - Versioning
- Credits
- License
-## Introduction
+# Introduction [↑](#top)
Design patterns are formalized best practices that the programmer can use to
solve common problems when designing an application or system.
@@ -38,6 +35,11 @@ problems, and it also improves code readability for coders and architects who
are familiar with the patterns.
+# How to contribute [↑](#top)
+
+If you are willing to contribute to the project you will find the relevant information in our [developer wiki](https://github.com/iluwatar/java-design-patterns/wiki).
+
+
# Frequently asked questions [↑](#top)
**Q: What is the difference between State and Strategy patterns?**
@@ -97,98 +99,6 @@ blocked waiting for available object from the pool. This is not the case with
Flyweight.
-
-# How to contribute [↑](#top)
-
-**To work on a new pattern** you need to do the following steps:
-
-1. If there is no issue for the new pattern yet, raise new issue. Comment on
- the issue that you are working on it so that others don't start work on the
- same thing.
-2. Fork the repository.
-3. Create a new folder for the pattern. The rough structure of the new folder would be as follows:
- * etc (every resource related to the pattern, like diagrams)
- * src (the source code of the pattern)
- * index.md (the description of the pattern)
- * pom.xml (the maven pom.xml)
-4. Implement the code changes in your fork. Remember to add sufficient comments
- documenting the implementation. Reference the issue id e.g. #52 in your
- commit messages.
-5. Format the code according to [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html)
- * [Eclipse configuration](https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml)
- * [IntelliJ configuration](https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml)
-6. Create a simple class diagram from your example code and put it inside of the etc folder.
-7. Add description of the pattern in index.md and link to the class diagram.
- (Attention, all internal links must be relative to the pattern subdirectory, else the links dont link properly on the website)
-8. Create a pull request.
-
-**Structure of the index.md file**
-
-```markdown
---- # this is so called 'Yaml Front Matter', read up on it here: http://jekyllrb.com/docs/frontmatter/
-layout: pattern # layout must allways be pattern
-title: Best Pattern Ever # the properly formatted title
-folder: best-pattern-ever # the folder name in which this pattern lies
-permalink: /patterns/best-pattern-ever/ # the permalink to the pattern, to keep this uniform please stick to /patterns/FOLDER/
-
-# both categories and tags are Yaml Lists
-# you can either just pick one or write a list with '-'s
-# usable categories and tags are listed here: https://github.com/iluwatar/java-design-patterns/blob/gh-pages/_config.yml
-categories: creational # categories of the pattern
-tags: # tags of the pattern
- - best
- - ever
- - awesome
----
-
-**Intent:** Makes your code awesome
-
-
-
-**Applicability:** Use the Best Pattern Ever pattern when
-
-* you want to be the best
-* you need to ...
-
-**Real world examples:**
-
-* [Nowhere](http://no.where.com)
-```
-
-**To add a new category or tag** you need to edit the _config.yml file of the gh-pages branch.
-In there you should find 2 yaml lists with the respective names 'category-list' and 'tag-list'
-
-**To work on one of the non-pattern issues** you need to do the following steps:
-
-1. Check that the issue has "help wanted" badge
-2. Comment on the issue that you are working on it
-3. Fork the repository.
-4. Implement the code changes in your fork. Remember to add sufficient comments
- documenting the implementation. Reference the issue id e.g. #52 in your
- commit messages.
-5. Create a pull request.
-
-**For creating/editing UML diagrams** you need [ObjectAid UML Explorer for Eclipse](http://www.objectaid.com/home).
-
-**For inspiration** check out the following sources:
-
-* there is a good list of design patterns at [Wikipedia](http://en.wikipedia.org/wiki/Software_design_pattern)
-* Martin Fowler's [Catalog of Patterns of Enterprise Application Architecture](http://martinfowler.com/eaaCatalog/)
-* [pattern language for microservices](http://microservices.io/patterns/index.html)
-* Microsoft's [Cloud Design Patterns](http://download.microsoft.com/download/B/B/6/BB69622C-AB5D-4D5F-9A12-B81B952C1169/CloudDesignPatternsBook-PDF.pdf)
-
-**Links to patterns applied in real world applications** are welcome. The links
-should be added to the corresponding section of the `index.md`.
-
-
-# Versioning [↑](#top)
-
-Java-design-patterns project uses [semantic versioning](http://semver.org/)
-scheme. However, version numbers in this project do not signify binary releases
-(since we don't make any) but rather milestones achieved on the roadmap. In
-other words, version numbers are used only for project planning sake.
-
-
# Credits [↑](#top)
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)
diff --git a/abstract-factory/pom.xml b/abstract-factory/pom.xml
index 798093c01..ddb7e7b9d 100644
--- a/abstract-factory/pom.xml
+++ b/abstract-factory/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
abstract-factory
diff --git a/adapter/pom.xml b/adapter/pom.xml
index 8def28655..74a58de92 100644
--- a/adapter/pom.xml
+++ b/adapter/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
adapter
diff --git a/async-method-invocation/pom.xml b/async-method-invocation/pom.xml
index 699258d93..2a5010b74 100644
--- a/async-method-invocation/pom.xml
+++ b/async-method-invocation/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
async-method-invocation
diff --git a/bridge/pom.xml b/bridge/pom.xml
index 01bd26061..947fa2c60 100644
--- a/bridge/pom.xml
+++ b/bridge/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
bridge
diff --git a/builder/pom.xml b/builder/pom.xml
index c5405d0c6..65997c9e6 100644
--- a/builder/pom.xml
+++ b/builder/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
builder
diff --git a/business-delegate/pom.xml b/business-delegate/pom.xml
index 2a7e77e3c..482d59fab 100644
--- a/business-delegate/pom.xml
+++ b/business-delegate/pom.xml
@@ -6,7 +6,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
business-delegate
diff --git a/callback/pom.xml b/callback/pom.xml
index d54b76172..f8cf6babf 100644
--- a/callback/pom.xml
+++ b/callback/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
callback
diff --git a/chain-of-responsibility/index.md b/chain/index.md
similarity index 87%
rename from chain-of-responsibility/index.md
rename to chain/index.md
index cf56fe3c6..25e14bf06 100644
--- a/chain-of-responsibility/index.md
+++ b/chain/index.md
@@ -1,8 +1,8 @@
---
layout: pattern
title: Chain of responsibility
-folder: chain-of-responsibility
-permalink: /patterns/chain-of-responsibility/
+folder: chain
+permalink: /patterns/chain/
categories: Behavioral
tags: Java
---
@@ -11,7 +11,7 @@ tags: Java
more than one object a chance to handle the request. Chain the receiving
objects and pass the request along the chain until an object handles it.
-
+
**Applicability:** Use Chain of Responsibility when
diff --git a/chain/pom.xml b/chain/pom.xml
index f4a712260..ebae620d6 100644
--- a/chain/pom.xml
+++ b/chain/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
chain
diff --git a/command/pom.xml b/command/pom.xml
index 10bc00f0c..401acba32 100644
--- a/command/pom.xml
+++ b/command/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
command
diff --git a/composite/pom.xml b/composite/pom.xml
index 4c910e451..ca4daaaad 100644
--- a/composite/pom.xml
+++ b/composite/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
composite
diff --git a/dao/pom.xml b/dao/pom.xml
index 6653741e4..a7a5c74ca 100644
--- a/dao/pom.xml
+++ b/dao/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
dao
diff --git a/decorator/pom.xml b/decorator/pom.xml
index 1b93a171c..57946b711 100644
--- a/decorator/pom.xml
+++ b/decorator/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
decorator
diff --git a/dependency-injection/pom.xml b/dependency-injection/pom.xml
index 70300b617..a6780cb20 100644
--- a/dependency-injection/pom.xml
+++ b/dependency-injection/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
dependency-injection
diff --git a/double-checked-locking/pom.xml b/double-checked-locking/pom.xml
index 21eb281c6..46d4a70f0 100644
--- a/double-checked-locking/pom.xml
+++ b/double-checked-locking/pom.xml
@@ -3,7 +3,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
double-checked-locking
diff --git a/double-dispatch/pom.xml b/double-dispatch/pom.xml
index 0d7462486..5f16635f6 100644
--- a/double-dispatch/pom.xml
+++ b/double-dispatch/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
double-dispatch
diff --git a/event-aggregator/pom.xml b/event-aggregator/pom.xml
index 90f488729..1c9a3b626 100644
--- a/event-aggregator/pom.xml
+++ b/event-aggregator/pom.xml
@@ -4,7 +4,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
event-aggregator
diff --git a/execute-around/pom.xml b/execute-around/pom.xml
index d8d41f5d8..7d806337b 100644
--- a/execute-around/pom.xml
+++ b/execute-around/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
execute-around
diff --git a/facade/pom.xml b/facade/pom.xml
index 53ac6fd67..17d3d707c 100644
--- a/facade/pom.xml
+++ b/facade/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
facade
diff --git a/factory-method/pom.xml b/factory-method/pom.xml
index 1812b006d..81072a4f9 100644
--- a/factory-method/pom.xml
+++ b/factory-method/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
factory-method
diff --git a/flux/pom.xml b/flux/pom.xml
index 367598fa2..3efccbfa4 100644
--- a/flux/pom.xml
+++ b/flux/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
flux
diff --git a/flyweight/pom.xml b/flyweight/pom.xml
index 87903217c..54ca5bef2 100644
--- a/flyweight/pom.xml
+++ b/flyweight/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
flyweight
diff --git a/front-controller/pom.xml b/front-controller/pom.xml
index d0fcc001f..a554186f3 100644
--- a/front-controller/pom.xml
+++ b/front-controller/pom.xml
@@ -6,7 +6,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
front-controller
diff --git a/half-sync-half-async/pom.xml b/half-sync-half-async/pom.xml
index edbc2e420..94c12d797 100644
--- a/half-sync-half-async/pom.xml
+++ b/half-sync-half-async/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
half-sync-half-async
diff --git a/intercepting-filter/pom.xml b/intercepting-filter/pom.xml
index b4b5db5ae..35ebd9f59 100644
--- a/intercepting-filter/pom.xml
+++ b/intercepting-filter/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
intercepting-filter
diff --git a/interpreter/pom.xml b/interpreter/pom.xml
index f2778e0cd..8583464d3 100644
--- a/interpreter/pom.xml
+++ b/interpreter/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
interpreter
diff --git a/iterator/pom.xml b/iterator/pom.xml
index b77939c9d..da5040dce 100644
--- a/iterator/pom.xml
+++ b/iterator/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
iterator
diff --git a/layers/pom.xml b/layers/pom.xml
index dd036e74c..de672a3df 100644
--- a/layers/pom.xml
+++ b/layers/pom.xml
@@ -6,7 +6,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
com.iluwatar.layers
layers
diff --git a/lazy-loading/pom.xml b/lazy-loading/pom.xml
index cbbafae14..b795abf87 100644
--- a/lazy-loading/pom.xml
+++ b/lazy-loading/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
lazy-loading
diff --git a/mediator/pom.xml b/mediator/pom.xml
index 2f3f83ff5..5a9c00042 100644
--- a/mediator/pom.xml
+++ b/mediator/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
mediator
diff --git a/memento/pom.xml b/memento/pom.xml
index ccc2bd1e2..182a46204 100644
--- a/memento/pom.xml
+++ b/memento/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
memento
diff --git a/model-view-controller/pom.xml b/model-view-controller/pom.xml
index 3a9167f5e..7162c71d9 100644
--- a/model-view-controller/pom.xml
+++ b/model-view-controller/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
model-view-controller
diff --git a/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/App.java b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/App.java
new file mode 100644
index 000000000..0b74f4b5a
--- /dev/null
+++ b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/App.java
@@ -0,0 +1,29 @@
+package com.iluwatar.model.view.controller.with.observer;
+
+/**
+ *
+ * In this second example the model-view relationship is different. This time we use the Observer pattern to notify
+ * the {@link GiantView} each time the {@link GiantModel} is changed. This way the {@link GiantController} responsibilities
+ * are narrowed and it only needs to modify the {@link GiantModel} according to the user input.
+ *
+ */
+public class App {
+
+ /**
+ * Program entry point
+ * @param args command line args
+ */
+ public static void main( String[] args ) {
+ // create model, view and controller
+ GiantModel giant = new GiantModel(Health.HEALTHY, Fatigue.ALERT, Nourishment.SATURATED);
+ GiantView view = new GiantView();
+ GiantController controller = new GiantController(giant, view);
+ // initial display
+ controller.updateView();
+ // controller receives some interactions that affect the giant
+ // model modifications trigger the view rendering automatically
+ controller.setHealth(Health.WOUNDED);
+ controller.setNourishment(Nourishment.HUNGRY);
+ controller.setFatigue(Fatigue.TIRED);
+ }
+}
diff --git a/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/Fatigue.java b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/Fatigue.java
new file mode 100644
index 000000000..301a579fb
--- /dev/null
+++ b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/Fatigue.java
@@ -0,0 +1,22 @@
+package com.iluwatar.model.view.controller.with.observer;
+
+/**
+ *
+ * Fatigue enumeration
+ *
+ */
+public enum Fatigue {
+
+ ALERT("alert"), TIRED("tired"), SLEEPING("sleeping");
+
+ private String title;
+
+ Fatigue(String title) {
+ this.title = title;
+ }
+
+ @Override
+ public String toString() {
+ return title;
+ }
+}
diff --git a/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/GiantController.java b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/GiantController.java
new file mode 100644
index 000000000..e892b2946
--- /dev/null
+++ b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/GiantController.java
@@ -0,0 +1,46 @@
+package com.iluwatar.model.view.controller.with.observer;
+
+/**
+ *
+ * GiantController updates the giant model.
+ *
+ */
+public class GiantController {
+
+ private GiantModel giant;
+ private GiantView view;
+
+ public GiantController(GiantModel giant, GiantView view) {
+ this.giant = giant;
+ this.view = view;
+ this.giant.registerObserver(this.view);
+ }
+
+ public Health getHealth() {
+ return giant.getHealth();
+ }
+
+ public void setHealth(Health health) {
+ this.giant.setHealth(health);
+ }
+
+ public Fatigue getFatigue() {
+ return giant.getFatigue();
+ }
+
+ public void setFatigue(Fatigue fatigue) {
+ this.giant.setFatigue(fatigue);
+ }
+
+ public Nourishment getNourishment() {
+ return giant.getNourishment();
+ }
+
+ public void setNourishment(Nourishment nourishment) {
+ this.giant.setNourishment(nourishment);
+ }
+
+ public void updateView() {
+ this.view.displayGiant(giant);
+ }
+}
diff --git a/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/GiantModel.java b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/GiantModel.java
new file mode 100644
index 000000000..84b32a50a
--- /dev/null
+++ b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/GiantModel.java
@@ -0,0 +1,63 @@
+package com.iluwatar.model.view.controller.with.observer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * GiantModel contains the giant data.
+ *
+ */
+public class GiantModel {
+
+ private Health health;
+ private Fatigue fatigue;
+ private Nourishment nourishment;
+ private List observers = new ArrayList<>();
+
+ GiantModel(Health health, Fatigue fatigue, Nourishment nourishment) {
+ this.health = health;
+ this.fatigue = fatigue;
+ this.nourishment = nourishment;
+ }
+
+ public Health getHealth() {
+ return health;
+ }
+
+ public void setHealth(Health health) {
+ this.health = health;
+ notifyObservers();
+ }
+
+ public Fatigue getFatigue() {
+ return fatigue;
+ }
+
+ public void setFatigue(Fatigue fatigue) {
+ this.fatigue = fatigue;
+ notifyObservers();
+ }
+
+ public Nourishment getNourishment() {
+ return nourishment;
+ }
+
+ public void setNourishment(Nourishment nourishment) {
+ this.nourishment = nourishment;
+ notifyObservers();
+ }
+
+ @Override
+ public String toString() {
+ return String.format("The giant looks %s, %s and %s.", health, fatigue, nourishment);
+ }
+
+ public void registerObserver(GiantModelObserver observer) {
+ observers.add(observer);
+ }
+
+ private void notifyObservers() {
+ observers.stream().forEach((GiantModelObserver o) -> o.modelChanged(this));
+ }
+}
diff --git a/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/GiantModelObserver.java b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/GiantModelObserver.java
new file mode 100644
index 000000000..6363ef4f7
--- /dev/null
+++ b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/GiantModelObserver.java
@@ -0,0 +1,12 @@
+package com.iluwatar.model.view.controller.with.observer;
+
+/**
+ *
+ * GiantModelObserver is the interface for delivering update notifications.
+ *
+ */
+public interface GiantModelObserver {
+
+ void modelChanged(GiantModel model);
+
+}
diff --git a/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/GiantView.java b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/GiantView.java
new file mode 100644
index 000000000..f4cebad80
--- /dev/null
+++ b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/GiantView.java
@@ -0,0 +1,18 @@
+package com.iluwatar.model.view.controller.with.observer;
+
+/**
+ *
+ * GiantView displays the giant
+ *
+ */
+public class GiantView implements GiantModelObserver {
+
+ public void displayGiant(GiantModel giant) {
+ System.out.println(giant);
+ }
+
+ @Override
+ public void modelChanged(GiantModel model) {
+ displayGiant(model);
+ }
+}
diff --git a/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/Health.java b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/Health.java
new file mode 100644
index 000000000..e4b8ed9a7
--- /dev/null
+++ b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/Health.java
@@ -0,0 +1,22 @@
+package com.iluwatar.model.view.controller.with.observer;
+
+/**
+ *
+ * Health enumeration
+ *
+ */
+public enum Health {
+
+ HEALTHY("healthy"), WOUNDED("wounded"), DEAD("dead");
+
+ private String title;
+
+ Health(String title) {
+ this.title = title;
+ }
+
+ @Override
+ public String toString() {
+ return title;
+ }
+}
diff --git a/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/Nourishment.java b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/Nourishment.java
new file mode 100644
index 000000000..c1a8253c3
--- /dev/null
+++ b/model-view-controller/src/main/java/com/iluwatar/model/view/controller/with/observer/Nourishment.java
@@ -0,0 +1,22 @@
+package com.iluwatar.model.view.controller.with.observer;
+
+/**
+ *
+ * Nourishment enumeration
+ *
+ */
+public enum Nourishment {
+
+ SATURATED("saturated"), HUNGRY("hungry"), STARVING("starving");
+
+ private String title;
+
+ Nourishment(String title) {
+ this.title = title;
+ }
+
+ @Override
+ public String toString() {
+ return title;
+ }
+}
diff --git a/model-view-controller/src/test/java/com/iluwatar/model/view/controller/with/observer/AppTest.java b/model-view-controller/src/test/java/com/iluwatar/model/view/controller/with/observer/AppTest.java
new file mode 100644
index 000000000..9a43ce7bc
--- /dev/null
+++ b/model-view-controller/src/test/java/com/iluwatar/model/view/controller/with/observer/AppTest.java
@@ -0,0 +1,19 @@
+package com.iluwatar.model.view.controller.with.observer;
+
+import org.junit.Test;
+
+import com.iluwatar.model.view.controller.with.observer.App;
+
+/**
+ *
+ * Application test
+ *
+ */
+public class AppTest {
+
+ @Test
+ public void test() {
+ String[] args = {};
+ App.main(args);
+ }
+}
diff --git a/model-view-presenter/pom.xml b/model-view-presenter/pom.xml
index 5277e57ab..41a2d2013 100644
--- a/model-view-presenter/pom.xml
+++ b/model-view-presenter/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
model-view-presenter
model-view-presenter
diff --git a/multiton/pom.xml b/multiton/pom.xml
index 8f1220119..6ea1ad2fa 100644
--- a/multiton/pom.xml
+++ b/multiton/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
multiton
diff --git a/naked-objects/dom/pom.xml b/naked-objects/dom/pom.xml
index 620efa9d7..cadf6d82e 100644
--- a/naked-objects/dom/pom.xml
+++ b/naked-objects/dom/pom.xml
@@ -16,7 +16,7 @@
com.iluwatar
naked-objects
- 1.5.0
+ 1.6.0
naked-objects-dom
diff --git a/naked-objects/fixture/pom.xml b/naked-objects/fixture/pom.xml
index b0146e84e..33cd798f7 100644
--- a/naked-objects/fixture/pom.xml
+++ b/naked-objects/fixture/pom.xml
@@ -16,7 +16,7 @@
com.iluwatar
naked-objects
- 1.5.0
+ 1.6.0
naked-objects-fixture
diff --git a/naked-objects/integtests/pom.xml b/naked-objects/integtests/pom.xml
index f479896cc..1fd518bb1 100644
--- a/naked-objects/integtests/pom.xml
+++ b/naked-objects/integtests/pom.xml
@@ -16,7 +16,7 @@
com.iluwatar
naked-objects
- 1.5.0
+ 1.6.0
naked-objects-integtests
diff --git a/naked-objects/pom.xml b/naked-objects/pom.xml
index 8860815af..8cac48a09 100644
--- a/naked-objects/pom.xml
+++ b/naked-objects/pom.xml
@@ -15,7 +15,7 @@
java-design-patterns
com.iluwatar
- 1.5.0
+ 1.6.0
naked-objects
@@ -350,17 +350,17 @@
${project.groupId}
naked-objects-dom
- 1.5.0
+ 1.6.0
${project.groupId}
naked-objects-fixture
- 1.5.0
+ 1.6.0
${project.groupId}
naked-objects-webapp
- 1.5.0
+ 1.6.0
diff --git a/naked-objects/webapp/pom.xml b/naked-objects/webapp/pom.xml
index 9873589c7..3e018995a 100644
--- a/naked-objects/webapp/pom.xml
+++ b/naked-objects/webapp/pom.xml
@@ -16,7 +16,7 @@
com.iluwatar
naked-objects
- 1.5.0
+ 1.6.0
naked-objects-webapp
diff --git a/null-object/pom.xml b/null-object/pom.xml
index dfa1c6891..eec32fd4d 100644
--- a/null-object/pom.xml
+++ b/null-object/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
null-object
diff --git a/object-pool/pom.xml b/object-pool/pom.xml
index 3226bf71c..4a3b237c6 100644
--- a/object-pool/pom.xml
+++ b/object-pool/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
object-pool
diff --git a/observer/pom.xml b/observer/pom.xml
index 49a484edf..19e93421c 100644
--- a/observer/pom.xml
+++ b/observer/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
observer
diff --git a/poison-pill/pom.xml b/poison-pill/pom.xml
index c3a5e46c1..2a0653981 100644
--- a/poison-pill/pom.xml
+++ b/poison-pill/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
poison-pill
diff --git a/pom.xml b/pom.xml
index 391ddd9c1..7b0d80bd8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
pom
diff --git a/private-class-data/pom.xml b/private-class-data/pom.xml
index 6e6817621..70a716062 100644
--- a/private-class-data/pom.xml
+++ b/private-class-data/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
private-class-data
diff --git a/property/pom.xml b/property/pom.xml
index 6b0511fe0..5435f06f5 100644
--- a/property/pom.xml
+++ b/property/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
property
diff --git a/prototype/pom.xml b/prototype/pom.xml
index 39d8b7d33..0ebba706e 100644
--- a/prototype/pom.xml
+++ b/prototype/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
prototype
diff --git a/proxy/pom.xml b/proxy/pom.xml
index 560c456b8..1f625d736 100644
--- a/proxy/pom.xml
+++ b/proxy/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
proxy
diff --git a/repository/pom.xml b/repository/pom.xml
index fe3ca4c0d..db0a8af5f 100644
--- a/repository/pom.xml
+++ b/repository/pom.xml
@@ -6,7 +6,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
repository
diff --git a/resource-acquisition-is-initialization/pom.xml b/resource-acquisition-is-initialization/pom.xml
index fb965ca2d..c8382ceb8 100644
--- a/resource-acquisition-is-initialization/pom.xml
+++ b/resource-acquisition-is-initialization/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
resource-acquisition-is-initialization
diff --git a/servant/pom.xml b/servant/pom.xml
index b59a470f2..b6497215f 100644
--- a/servant/pom.xml
+++ b/servant/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
servant
diff --git a/service-layer/pom.xml b/service-layer/pom.xml
index 96e4e6dbf..8e0ea8322 100644
--- a/service-layer/pom.xml
+++ b/service-layer/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
service-layer
diff --git a/service-locator/pom.xml b/service-locator/pom.xml
index 6b287242e..a596e4b0c 100644
--- a/service-locator/pom.xml
+++ b/service-locator/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
service-locator
diff --git a/singleton/pom.xml b/singleton/pom.xml
index dfb5cff82..cdd9b613a 100644
--- a/singleton/pom.xml
+++ b/singleton/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
singleton
diff --git a/specification/pom.xml b/specification/pom.xml
index 53e92fef1..b4d6efe90 100644
--- a/specification/pom.xml
+++ b/specification/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
specification
diff --git a/state/pom.xml b/state/pom.xml
index e9178d0ae..0119146b3 100644
--- a/state/pom.xml
+++ b/state/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
state
diff --git a/step-builder/pom.xml b/step-builder/pom.xml
index 8466266a7..f9c98474b 100644
--- a/step-builder/pom.xml
+++ b/step-builder/pom.xml
@@ -6,7 +6,7 @@
java-design-patterns
com.iluwatar
- 1.5.0
+ 1.6.0
step-builder
diff --git a/strategy/pom.xml b/strategy/pom.xml
index c24ccf9af..9532a8079 100644
--- a/strategy/pom.xml
+++ b/strategy/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
strategy
diff --git a/template-method/pom.xml b/template-method/pom.xml
index b0063c79e..53a7dc56e 100644
--- a/template-method/pom.xml
+++ b/template-method/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
template-method
diff --git a/thread-pool/pom.xml b/thread-pool/pom.xml
index 21f0bad3d..42e54de7e 100644
--- a/thread-pool/pom.xml
+++ b/thread-pool/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
thread-pool
diff --git a/tolerant-reader/pom.xml b/tolerant-reader/pom.xml
index fb28424d4..7e852d4ee 100644
--- a/tolerant-reader/pom.xml
+++ b/tolerant-reader/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
tolerant-reader
diff --git a/visitor/pom.xml b/visitor/pom.xml
index a420b3269..8adda4855 100644
--- a/visitor/pom.xml
+++ b/visitor/pom.xml
@@ -5,7 +5,7 @@
com.iluwatar
java-design-patterns
- 1.5.0
+ 1.6.0
visitor