Merge branch 'master' into message-channel
This commit is contained in:
commit
ed820816ef
106
README.md
106
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://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) <a href="https://scan.coverity.com/projects/5634">
|
[](https://travis-ci.org/iluwatar/java-design-patterns) [](https://coveralls.io/r/iluwatar/java-design-patterns?branch=master) <a href="https://scan.coverity.com/projects/5634">
|
||||||
<img alt="Coverity Scan Build Status"
|
<img alt="Coverity Scan Build Status"
|
||||||
src="https://scan.coverity.com/projects/5634/badge.svg"/>
|
src="https://scan.coverity.com/projects/5634/badge.svg"/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
#### Browse and view all of the patterns on our Website: [iluwatar.github.io/java-design-patterns/](https://iluwatar.github.io/java-design-patterns/)
|
|
||||||
|
|
||||||
<a name="top"/>
|
<a name="top"/>
|
||||||
|
|
||||||
# <a name="toc">Table of Contents</a>
|
# <a name="toc">Table of Contents</a>
|
||||||
- <a href="#introduction">Introduction</a>
|
- <a href="#introduction">Introduction</a>
|
||||||
|
- <a href="#contribute">How to contribute</a>
|
||||||
- <a href="#faq">Frequently Asked Questions</a>
|
- <a href="#faq">Frequently Asked Questions</a>
|
||||||
- <a href="#how-to-contribute">How to contribute</a>
|
|
||||||
- <a href="#versioning">Versioning</a>
|
|
||||||
- <a href="#credits">Credits</a>
|
- <a href="#credits">Credits</a>
|
||||||
- <a href="#license">License</a>
|
- <a href="#license">License</a>
|
||||||
|
|
||||||
|
|
||||||
## <a name="introduction">Introduction</a>
|
# <a name="introduction">Introduction</a> [↑](#top)
|
||||||
|
|
||||||
Design patterns are formalized best practices that the programmer can use to
|
Design patterns are formalized best practices that the programmer can use to
|
||||||
solve common problems when designing an application or system.
|
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.
|
are familiar with the patterns.
|
||||||
|
|
||||||
|
|
||||||
|
# <a name="contribute">How to contribute</a> [↑](#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).
|
||||||
|
|
||||||
|
|
||||||
# <a name="faq">Frequently asked questions</a> [↑](#top)
|
# <a name="faq">Frequently asked questions</a> [↑](#top)
|
||||||
|
|
||||||
**<a id="Q1">Q: What is the difference between State and Strategy patterns?</a>**
|
**<a id="Q1">Q: What is the difference between State and Strategy patterns?</a>**
|
||||||
@ -97,98 +99,6 @@ blocked waiting for available object from the pool. This is not the case with
|
|||||||
Flyweight.
|
Flyweight.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# <a name="how-to-contribute">How to contribute</a> [↑](#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`.
|
|
||||||
|
|
||||||
|
|
||||||
# <a name="versioning">Versioning</a> [↑](#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.
|
|
||||||
|
|
||||||
|
|
||||||
# <a name="credits">Credits</a> [↑](#top)
|
# <a name="credits">Credits</a> [↑](#top)
|
||||||
|
|
||||||
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)
|
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>abstract-factory</artifactId>
|
<artifactId>abstract-factory</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>adapter</artifactId>
|
<artifactId>adapter</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>async-method-invocation</artifactId>
|
<artifactId>async-method-invocation</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>bridge</artifactId>
|
<artifactId>bridge</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>builder</artifactId>
|
<artifactId>builder</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>business-delegate</artifactId>
|
<artifactId>business-delegate</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>callback</artifactId>
|
<artifactId>callback</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
layout: pattern
|
layout: pattern
|
||||||
title: Chain of responsibility
|
title: Chain of responsibility
|
||||||
folder: chain-of-responsibility
|
folder: chain
|
||||||
permalink: /patterns/chain-of-responsibility/
|
permalink: /patterns/chain/
|
||||||
categories: Behavioral
|
categories: Behavioral
|
||||||
tags: Java
|
tags: Java
|
||||||
---
|
---
|
||||||
@ -11,7 +11,7 @@ tags: Java
|
|||||||
more than one object a chance to handle the request. Chain the receiving
|
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.
|
objects and pass the request along the chain until an object handles it.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
**Applicability:** Use Chain of Responsibility when
|
**Applicability:** Use Chain of Responsibility when
|
||||||
|
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>chain</artifactId>
|
<artifactId>chain</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>command</artifactId>
|
<artifactId>command</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>composite</artifactId>
|
<artifactId>composite</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>dao</artifactId>
|
<artifactId>dao</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>decorator</artifactId>
|
<artifactId>decorator</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>dependency-injection</artifactId>
|
<artifactId>dependency-injection</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>double-checked-locking</artifactId>
|
<artifactId>double-checked-locking</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>double-dispatch</artifactId>
|
<artifactId>double-dispatch</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>event-aggregator</artifactId>
|
<artifactId>event-aggregator</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>execute-around</artifactId>
|
<artifactId>execute-around</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>facade</artifactId>
|
<artifactId>facade</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>factory-method</artifactId>
|
<artifactId>factory-method</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>flux</artifactId>
|
<artifactId>flux</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>flyweight</artifactId>
|
<artifactId>flyweight</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>front-controller</artifactId>
|
<artifactId>front-controller</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>half-sync-half-async</artifactId>
|
<artifactId>half-sync-half-async</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>intercepting-filter</artifactId>
|
<artifactId>intercepting-filter</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>interpreter</artifactId>
|
<artifactId>interpreter</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>iterator</artifactId>
|
<artifactId>iterator</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>com.iluwatar.layers</groupId>
|
<groupId>com.iluwatar.layers</groupId>
|
||||||
<artifactId>layers</artifactId>
|
<artifactId>layers</artifactId>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>lazy-loading</artifactId>
|
<artifactId>lazy-loading</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>mediator</artifactId>
|
<artifactId>mediator</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>memento</artifactId>
|
<artifactId>memento</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>model-view-controller</artifactId>
|
<artifactId>model-view-controller</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
@ -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<GiantModelObserver> 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));
|
||||||
|
}
|
||||||
|
}
|
@ -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);
|
||||||
|
|
||||||
|
}
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>model-view-presenter</artifactId>
|
<artifactId>model-view-presenter</artifactId>
|
||||||
<name>model-view-presenter</name>
|
<name>model-view-presenter</name>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>multiton</artifactId>
|
<artifactId>multiton</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.5.0</version>
|
<version>1.6.0</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.5.0</version>
|
<version>1.6.0</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.5.0</version>
|
<version>1.6.0</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.5.0</version>
|
<version>1.6.0</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.5.0</version>
|
<version>1.6.0</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.5.0</version>
|
<version>1.6.0</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.5.0</version>
|
<version>1.6.0</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.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>naked-objects-webapp</artifactId>
|
<artifactId>naked-objects-webapp</artifactId>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>null-object</artifactId>
|
<artifactId>null-object</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>object-pool</artifactId>
|
<artifactId>object-pool</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>observer</artifactId>
|
<artifactId>observer</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>poison-pill</artifactId>
|
<artifactId>poison-pill</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>private-class-data</artifactId>
|
<artifactId>private-class-data</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>property</artifactId>
|
<artifactId>property</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>prototype</artifactId>
|
<artifactId>prototype</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>proxy</artifactId>
|
<artifactId>proxy</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>repository</artifactId>
|
<artifactId>repository</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>resource-acquisition-is-initialization</artifactId>
|
<artifactId>resource-acquisition-is-initialization</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>servant</artifactId>
|
<artifactId>servant</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>service-layer</artifactId>
|
<artifactId>service-layer</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>service-locator</artifactId>
|
<artifactId>service-locator</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>singleton</artifactId>
|
<artifactId>singleton</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>specification</artifactId>
|
<artifactId>specification</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>state</artifactId>
|
<artifactId>state</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>step-builder</artifactId>
|
<artifactId>step-builder</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>strategy</artifactId>
|
<artifactId>strategy</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>template-method</artifactId>
|
<artifactId>template-method</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>thread-pool</artifactId>
|
<artifactId>thread-pool</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>tolerant-reader</artifactId>
|
<artifactId>tolerant-reader</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.iluwatar</groupId>
|
<groupId>com.iluwatar</groupId>
|
||||||
<artifactId>java-design-patterns</artifactId>
|
<artifactId>java-design-patterns</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>visitor</artifactId>
|
<artifactId>visitor</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user