Compare commits

..

1496 Commits

Author SHA1 Message Date
3b87565fb6 docs: add HattoriHenzo as a contributor for code (#1981)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-04-15 20:16:46 +03:00
da9f26bbc0 fix: Correction of the CheckStyle issue the project acyclic-visitor (#1969) 2022-04-15 20:14:12 +03:00
dde31bfe34 enhancement: Update Gitignore for OSX (#1955) 2022-02-12 20:14:44 +02:00
1596e9048d docs: add ShivanshCharak as a contributor for code (#1958)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-01-30 21:01:10 +02:00
a4aff05123 refactoring: modified modem.java (#1952) 2022-01-30 20:57:46 +02:00
c87689b247 task: Update Multiton example (#1950)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2022-01-24 21:58:44 +05:30
5ce0419b44 task: Update Maven version (#1949)
* Update maven and maven wrapper to the latest versions

* Update maven-war-plugin version

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2022-01-24 21:57:02 +05:30
58ce3a2ab2 docs: add Kevinyl3 as a contributor for code (#1951)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2022-01-18 21:58:43 +02:00
7652b11bca new pattern: Issue#1264: Implemented Composite-View Pattern (#1923)
* initial commit, created package, README, pom, and directory structure.

* Issue#1264, continue working on JavaBeans, added getters, setters, and private fields. Created test file for JavaBeans.

* set up junit for tests folder.

* Issue#1264, set up local server and added web-application framework to composite-view to allow the JSP to run on a local Tomcat container. Wrote unit tests for Java-bean class, working on JSP pages.

* Issue#1264, Added forwarding functionality to servlet and main composite view page.

* Issue#1264, Finished composite view template in newsDisplay.jsp and created atomic sub-view components in businessNews.jsp, header.jsp, localNews.jsp, scienceNews.jsp, sportsNews.jsp, worldNews.jsp. Composite view page renders correctly, atomic views are inserted in and substituted in the template page depending on request parameters.

* Issue#1264, Added all views, updated README.md with documentation.

* Issue#1264, updated README.md, moved images folder into etc folder.

* Issue#1264, removed build artifacts from tracked files.

* Issue#1264, updated README.md

* Issue#1264, updated README.md

* Issue#1264, removed unused import, made AppServlet class final, changed to .equals() for string comparison.

* Issue#1264, in AppServlet, put the output writing into try blocks to ensure writers are closed.

* Issue#1264, added tests for Servlet, coverage up to 100%, used lombok to reduce boilerplate setters and getter, updated README.md with better grammar, appropriate tags and links to related patterns. Updated pom.xml to get rid of superfluous lines.

* Issue#1264, made changes as requested in README.md.

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2022-01-18 21:51:53 +02:00
07ee94d671 refactoring: execute around idiom (#1945)
* Refactor execute around the idiom

* fix checkstyle errors

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2022-01-10 17:04:19 +05:30
c5492184b7 enhancement: check spelling and update topic (#1943)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2022-01-08 18:03:19 +05:30
4f8007d674 enhancement: Refactor and add explanation for value object (#1942)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2022-01-08 18:01:09 +05:30
2d2dec98e8 enhancement: Add explanation for factory kit (#1941)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2022-01-08 17:59:30 +05:30
3cc9bc2dea refactoring: unit of work (#1940)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2022-01-08 17:57:11 +05:30
11f20593b2 Update throttling pattern (#1937)
* Create component.urm.puml

* Create App.java

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Create AppTest.java

* Add files via upload

* Update README.md

* Update README.md

* Update pom.xml

* Update App.java

* Update BjornGraphicsComponent.java

* Update BjornInputComponent.java

* Update BjornPhysicsComponent.java

* Update Component.java

* Update App.java

* Delete App.java

* Delete BjornGraphicsComponent.java

* Delete BjornInputComponent.java

* Delete BjornPhysicsComponent.java

* Delete Component.java

* Delete GameObject.java

* Delete GraphicsComponent.java

* Delete InputComponent.java

* Delete PhysicsComponent.java

* Create App.java

* Update App.java

* Update App.java

* Create BjornGraphicsComponent.java

* Create BjornInputComponent.java

* Create BjornPhysicsComponent.java

* Create Component.java

* Create GameObject.java

* Create GraphicsComponent.java

* Create InputComponent.java

* Create PhysicsComponent.java

* Delete AppTest.java

* Delete UpdateTest.java

* Create AppTest.java

* Create UpdateTest.java

* Update throttling pattern example

* delete unwanted files

Co-authored-by: YanchaoMiao <11710204@mail.sustech.edu.cn>
2022-01-07 09:46:59 +02:00
c66ca67201 #590 add explanation for event aggregator (#1936) 2022-01-06 18:43:16 +02:00
2679f7aa6f docs: add castleKing1997 as a contributor for code (#1939)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-01-01 20:48:21 +02:00
8403fdacdd feature: Metadata Mapping pattern (#1932)
* metadata-mapping

* Update README.md

* add class diagram

* update README.md

* fix identation

* Update pom.xml

* fix indentation

* fix ci

* remove e.printstack

* fix ci

* update class diagram

* fix ci

* fix ci

* fix sc

* fix smells

* Update DatabaseUtil.java

* fix coverage

* Update DatabaseUtil.java

* Update DatabaseUtil.java

* Update DatabaseUtil.java

* Update metadata-mapping/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* fix review

* fix review

* Update App.java

* Update App.java

* fix review

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2022-01-01 20:46:20 +02:00
f670ae547b docs: add Leisterbecker as a contributor for code (#1935)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-12-23 20:45:14 +02:00
df73d80365 improvement: EventAggregator now considers Event-Type (#1933)
* Implemented more granular registration of observers with HashMap;
Key: Event, Value: List of Observers registered for the event;

* Edited constructors and super calls of all EventEmitter extenders

* Edited constructor calls in App.java

* Edited EventEmitterTest

* Added new white walkers event, scout emits at wednesday, varys observes and emits at saturday

* Added white walkers event to KingsHandTest.java

* Varys now passes events

* Corrected some indentation levels and added curly braces to if statements

* Corrected some styling

* Switched lines in App.java,
added javadoc to registerObserver

* Fixed some indents, added param comments
2021-12-23 20:43:36 +02:00
4588e09939 docs: add yuhangbin as a contributor for code (#1934)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-12-23 18:11:48 +02:00
69883196d2 improvement: Optimized NioReactor stop() (Reactor Pattern) (#1930)
* Optimized NioReactor stop()

* Optimized ThreadPoolDispatcher stop()
2021-12-23 18:10:17 +02:00
4dcc20b733 docs: add interactwithankush as a contributor for code (#1931)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-12-16 20:06:21 +05:30
600227d2e4 fix: Sonar report - fix blocker and critical ones (#1899)
* update SpatialPartitionBubbles - fix Sonar blocker issue

* fix Sonar critical issue - Define constant instead of duplicating the literal

* fix Sonar critical issue - remove unnecessary default constructor

* fix Sonar critical issue - Define constant instead of duplicating the literal

* fix Sonar critical issue - Define constant instead of duplicating the literal

* fix Sonar critical issue - Define constant instead of duplicating the literal

* fix Sonar critical issue - fix checkstyle issue

* fix Sonar critical issue - fix code smells

* fix Sonar critical issue - fix code smells

* fix Sonar critical issue - fix code smells

* fix sonarbugs - adding test cases for Commander class

* sonar fix - add assert commands in CommanderTest

* sonar fix - add test cases for CommanderTest

* sonar fix - add test cases for CommanderTest

* sonar fix - add test cases for CommanderTest

* sonar fix - add test cases for CommanderTest

* sonar fix - add test cases for CommanderTest

* sonar fix - add test cases for CommanderTest

* sonar fix - add test cases for CommanderTest

* sonar bug fix & test cases

* sonar bug fix & test cases

* sonar bug fix & test cases

* sonar bug fix & test cases

* sonar bug fix & test cases

* Revert "sonar bug fix & test cases"

This reverts commit 640dd55e35.

* sonar bug fix & test cases

* sonar bug fix & test cases

* sonar bug fix & test cases

* sonar bug fix : avoid Thread.sleep

* sonar bug fix : cleanup Thread.sleep

* sonar bug fix: test commit

* sonar bug fix: test commit

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: atayal <Ankush_Tayal@intuit.com>
2021-12-16 20:05:13 +05:30
fee898cd27 fix: Add language to claim check frontmatter (#1928)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-12-16 20:00:25 +05:30
b1242629c8 fix: Grammatical fixes for Adapter (#1783)
* Grammatical fixes

* Update adapter/README.md

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-12-16 19:59:06 +05:30
5d78a77b97 docs: add Shrirang97 as a contributor for review, code (#1927)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-12-11 17:08:30 +02:00
9063336687 feature: Claim check pattern azure (#1897)
* Archietecture Diagram added

* Added pom.xml

* Architecture Diagram Updated

* Added Microservices and kafka

* ReadME File Added

* ReadME file Updated

* #1329 ReadMe file updated and working pattern code added

* #1329 readme file updated

* #1329 readme file updated and java documentation added

* #1329 repository merged

* Update claim-check-pattern/ReadME.md

#1329 Real world description updated

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* #1329 Update claim-check-pattern/ReadME.md

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* #1329 Applicability section in ReadMe file updated

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* #1329 Tutorial section in ReadMe file updated

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* #1329 Storage Data section in ReadMe File updated

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* #1329 workflow section Update claim-check-pattern/ReadME.md

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* #1329 Update claim-check-pattern/pom.xml

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* #1329 deleted mvnw.cmd file

* #1329 deleted  drawio file

* #1329 deleted mvnw file

* #1329 deleted mvnw file

* #1329 mvnw.cmd file deleted

* #1329 Update claim-check-pattern/usage-cost-processor/src/main/java/com/callusage/domain/MessageHeader.java

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* #1329 Update claim-check-pattern/usage-cost-processor/src/main/java/com/callusage/domain/UsageCostDetail.java

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* #1329 Update claim-check-pattern/usage-cost-processor/src/main/java/com/callusage/domain/UsageDetail.java

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* #1329 deleted mvnw file

* #1329 deleted mvnw.cmd file

* #1329 Update claim-check-pattern/usage-detail-sender/src/main/java/com/callusage/domain/Message.java

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* #1329 Update claim-check-pattern/ReadME.md

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* #1329 pom file dependencies fixed, readmeflie updated, removed unused imports

* #1329 Readfile updated, class javadoc added

* #1329  UML class diagrams added, readme file updated

* #1329  lombok annotations used on model classes, common dependencies moved to parent pom

* #1329  test cases added

* include claim-check-pattern in parent pom

* #1329 code smells fixed

* #1329 code smells removed

* #1329 security issues fixed

* #1329 updated pom files and refactored packages name

* #1329 checkstyle warning fixed

* #1329 code coverage increased

* #1329 minor changed.

* checkpoint created with common utility

* Claim-Check-Pattern | Shrirang97 | Implemented using Java Azure Functions

* Claim-Check-Pattern | Shrirang97 | Updated Functions logic

* Update MessageHandlerUtility.java

* Update UsageCostProcessorFunction.java

* claim-check-pattern | Shrirang97 | Added test cases

* claim-check-pattern | Shrirang97 | Test cases for Azure functions fixed

* Claim-Check-Pattern | Shrirang | Used string as request body

* claim-check-pattern | Shrirang | Working test cases

* claim-check-pattern | Shrirang | Issue fixed while deserializing

* claim-check-pattern | Shrirang | removed unused import

* claim-check-pattern | Shrirang | fixed refactoring

* claim-chek-pattern | Shrirang | added lombok | fixed dependencies & test cases

* Delete .DS_Store

* claim-check-pattern | Shrirang | Fixed unrelated file

* Update BookService.java

* Update BookService.java

* claim-check-pattern | Shrirang | Fixed unrelated files

* claim-check-pattern | Shrirang | Fixed review comments

* Update UsageCostProcessorFunction.java

* Update ReadME.md

* Rename ReadME.md to README.md

* claim-check-pattern | Shrirang | Incorporated review comments.

* Update cloud-claim-check-pattern/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update cloud-claim-check-pattern/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update cloud-claim-check-pattern/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update cloud-claim-check-pattern/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update cloud-claim-check-pattern/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update cloud-claim-check-pattern/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update cloud-claim-check-pattern/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Updated readme file

* Read me file updated | Added more description

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2021-12-11 16:59:36 +02:00
b22c8bc32f docs: add Kevinyl3 as a contributor for review (#1926)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-12-11 16:34:05 +02:00
f7fc48d6b7 docs: add vashisthabhinav as a contributor for doc (#1921)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-12-06 11:59:55 +02:00
414e3263b1 docs: Correcting some grammatical errors of README.md (#1911)
* Update README.md

Corrected some sentences grammatically.

* Update README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2021-12-06 11:56:46 +02:00
2674cb9523 Set version for the next development iteration 2021-11-11 21:49:55 +02:00
925755fa35 Reach milestone 1.25.0 2021-11-11 21:47:49 +02:00
89b2072131 fix: use double check to fix concurrent problem (#1909)
Co-authored-by: zhangwenhe <zhangwh@ehualu.com>
2021-11-11 19:46:24 +02:00
0a7b524bd1 docs: add harshalkh as a contributor for code (#1900)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-31 09:12:05 +02:00
36c6ce1df7 sonar fix: Update App.java (#1896)
* Update App.java

Sonar issue fix

* Update App.java
2021-10-31 09:10:58 +02:00
22ddd57146 sonar fix: Update App.java (#1898) 2021-10-31 09:08:49 +02:00
72bb189dc0 CI: Update Workflows (#1879)
* Update Workflows

#1875

* Updated requested changes
2021-10-27 21:44:00 +03:00
bee1283371 docs: updated example with lombok as per code (#1891) 2021-10-24 17:27:24 +03:00
785cbf42b7 docs: add Fiordy as a contributor for doc (#1890)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-24 09:51:18 +03:00
c51eb66c89 docs: abstract-factory - readme - corrected code description as per real file (#1887) 2021-10-24 09:49:52 +03:00
1eb74203fc docs: add uh-zz as a contributor for translation (#1889)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-24 09:41:49 +03:00
c6803f920d translation: Add Japanese README (#1885) 2021-10-24 09:40:05 +03:00
b80ac39e1f docs: Add tutorial link for Acyclic Visitor pattern (#525) (#1884) 2021-10-24 09:23:12 +03:00
da6d20e997 docs: Add tutorial links for Builder pattern (#525) (#1883) 2021-10-24 09:11:34 +03:00
5dbb176a33 docs: Add tutorial links for Adapter pattern (#525) (#1882) 2021-10-24 09:09:06 +03:00
e3c3b02efd docs: Add tutorial links for Active object pattern (#525) (#1881) 2021-10-24 09:06:15 +03:00
988c478ad4 docs: add blueberry404 as a contributor for doc (#1888)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-24 09:04:52 +03:00
221daf5d74 docs: Add tutorial links for Visitor pattern (#525) (#1880) 2021-10-24 09:03:29 +03:00
90b1b922e1 docs: add ManviGoel26 as a contributor for doc (#1878)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-21 21:15:45 +03:00
bd71bc1311 docs: add explanation for twin pattern (#1869)
* add explanation for twin pattern

* updated explanation of twin pattern
2021-10-21 21:14:10 +03:00
54d19d4c87 docs: add carldea as a contributor for code (#1876)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

* Removed Conflicts

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Subhrodip Mohanta <contact@subho.xyz>
2021-10-21 23:39:05 +05:30
464b166fa3 docs: add Mozartuss as a contributor for translation (#1877)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-21 20:40:58 +03:00
78abdb4e13 Fix typo, grammer and links (#1874) 2021-10-21 20:39:34 +03:00
d1c26f9d84 task: update GHA JDK build vendor from adopt build to Zulu (#1868)
* Using the latest LTS and fixed (major) versions of the OpenJDK.
Signed-off-by: Carl Dea <carldea@gmail.com>

* Using the latest LTS and fixed (major) versions of the OpenJDK. Removed 17 & 18-ea releases.
Signed-off-by: Carl Dea <carldea@gmail.com>

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-10-21 21:00:45 +05:30
ba51a49802 translation: Add a German README (#1872)
* Add German Readme

* Add german readme
2021-10-20 21:29:15 +03:00
73eca64b9f refactoring: Issue-1694: Improve caching pattern code quality (#1810)
* Changed database implementation. Removed static objects.

* Fix Logs

* Fix 40 errors from checkstyle plugin run. 139 left))

* Fix CacheStore errors from checkstyle plugin 107 left

* Fix last errors in checkstyle.

* Fix sonar issues

* Fix issues in VALIDATE phase

* Fix Bug with mongo connection. Used "Try with resources"

* Add test

* Added docker-compose for mongo db. MongoDb db work fixed.

* Provided missing tests

* Comments to start Application with mongo.

* Fixes according PR comments. Mainly Readme edits.

* Remove duplicated imports
2021-10-20 20:44:01 +03:00
8aac45ab69 maintenance: Update Spacing of XML (#1866)
PR Set 4 of 4
2021-10-19 20:56:44 +03:00
2c93c81cf9 maintenance: Update Spacing of XML (#1865)
PR Set 3 of 4
2021-10-19 20:54:24 +03:00
656b441e29 maintenance: Update Spacing of XML (#1864)
PR Set 2 of 4
2021-10-19 20:51:43 +03:00
37d9ff3342 maintenance: Update Spacing of XML (#1863)
PR Set 1 of 4
2021-10-19 20:49:46 +03:00
d9dae3ae6a doc fix: Recalculate already added rows. (#1862) 2021-10-19 20:06:38 +03:00
1354bf0f55 docs: Update README.md to accommodate 7 contributors per row (#1854)
* Update per line Contributor to 7 from 4

This will be helpful to reduce page size and shorten the length of the README, which is our landing page in GitHub and help us make it clutter free

* Update the Readme to accommodate upto 7 rows
2021-10-16 20:19:25 +03:00
dc7c99c32f docs: add Dev-AliGhasemi as a contributor for code (#1861)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-16 20:11:23 +03:00
c2786e5dc4 add monitor design pattern (#1640)
* add monitor design pattern .

* add extra line and change compiler version to 11 in pom.xml.

* encapsulate getBalance method .

* update puml file .

* export uml as png .

* duplicate codes eliminated .

* update tag

* change the format of pom.xml

* using logger to print

* change AtomicRefrence to type inference var

* explanations added !

* Update monitor/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update monitor/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update monitor/src/main/java/com/iluwatar/monitor/Main.java

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update monitor/src/main/java/com/iluwatar/monitor/Main.java

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update monitor/src/main/java/com/iluwatar/monitor/Main.java

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update monitor/src/main/java/com/iluwatar/monitor/Main.java

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* e.printStackTrace have changed to logger to prints standard output (STD OUT) .

* add programmatic example .

* Delete mvnw

* mvnw.cmd deleted .

* added mvnw from master

* AddUnitTest

* Add language to readme.md

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
Co-authored-by: Subhrodip Mohanta <subhromo@cisco.com>
Co-authored-by: Subhrodip Mohanta <contact@subho.xyz>
2021-10-16 20:08:53 +03:00
a1f3c6fe20 docs: add JCarlosR as a contributor for translation (#1857)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-15 20:27:23 +03:00
0ad44ced24 docs: Fix typos spanish readme and factory (#1834)
* Fix typos for Spanish README

* Fix typos in the factory example
2021-10-15 20:24:49 +03:00
4c5c0fd63e docs: add sims-keshri as a contributor for code (#1853)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-13 13:17:48 +05:30
5a644f1092 refactoring: Critical Sonar Issues (#1833)
* Resolve Sonar Code Smell: Define a constant instead of duplicating this literal 'Space rocket <' 4 times.

* Resolve Sonar Critical Code Smell: Define a constant instead of duplicating this literal 'Error connecting to MongoDB' 4 times.

* Fix checkstyle violation.

* Resolve Sonar Critical Code Smell: Define a constant instead of duplicating this literal 'LITERAL 0' 4 times.

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-10-13 13:15:22 +05:30
cab9048e06 docs: fixes for yaml frontmatter (#1851)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-10-13 12:59:55 +05:30
d247b6ed69 docs: add VxDxK as a contributor for translation (#1848)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-11 21:45:21 +03:00
0a73ead12d translation: Add Russian translation (#1846)
* Add ru url to README.md

* Create russian README.md
2021-10-11 21:43:58 +03:00
ddb9b14eed docs: add muklasr as a contributor for translation (#1845)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-08 20:47:25 +03:00
0255111b4e translation: Add Indonesian translation (#1841)
* Create README.md in id

* Add README.md in id url
2021-10-08 20:45:59 +03:00
9513d2be58 docs: add Conhan93 as a contributor for doc (#1844)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-08 20:36:02 +03:00
119abf3ee4 Doc: Corrected a few spelling mistakes (#1840) 2021-10-08 20:34:47 +03:00
87cc4df14b docs: Add frascu as a Contributor for Code (#1835)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-05 10:07:07 +05:30
57f9c2e968 task: Update Lombok to version 1.18.20 (#1828)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-10-05 10:05:20 +05:30
42eb7950ae task: Fix broken links (#1817)
* Fix some broken links

* Remove extra space

* Update filename

* Fix some links in localization folders

* Fix link

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-09-29 00:13:31 +05:30
be72a96cd6 docs: add tan31989 as a contributor for code (#1820)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-09-29 00:11:14 +05:30
be25c0b433 bug-fix: Use Junit5 in the serverless module tests (#1794)
* #1667: Fixing the serverless tests to use Junit5 and also modifying other classes to remove the deprecated initMock() method

* #1667: Fixing the sonar code smells

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-09-29 00:09:19 +05:30
be59e50205 doc: Fix Typos in French local doc (#1818)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-09-28 21:49:30 +05:30
ec90320eda docs: add mortezaadi as a contributor for code (#1816)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-09-07 21:46:23 +03:00
3126ad3106 fix: Remove unnecessary and possibly not threadsafe flag (#1811) 2021-09-07 21:43:47 +03:00
e2ebb59fe7 docs: add karthikbhat13 as a contributor for code (#1808)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-08-08 15:53:13 +03:00
d87e8cf10d feature: Added FanOut/FanIn Pattern (#1800)
* Added FanOut/FanIn Pattern (#8)

* #1627 adding fanout-fanin pattern

* #1627 adding class diagram image

* #1627 adding readme

* #1627 adding license

* #1627 updating relations

* #1627 interrupting the thread

* #1627 fixing sonar issues

* #1627 fixing sonar issues

* #1627 adding more info in README.md

* Added FanOut/FanIn (#9)

* #1627 adding fanout-fanin pattern

* #1627 adding class diagram image

* #1627 adding readme

* #1627 adding license

* #1627 updating relations

* #1627 interrupting the thread

* #1627 fixing sonar issues

* #1627 fixing sonar issues

* #1627 adding more info in README.md

* #1627 adding programmatic examples in README.md
2021-08-08 15:51:27 +03:00
c5a4068e84 docs: Translation for zh (#1805)
* add state and callback pattern

* add command and template-method pattern

* add iterator pattern

* add bridege and DI pattern

* fix issue #1600

* add converter,proxy,visitor pattern

* add caching,composite,delegation,dirty-flag,interpreter patterns

* add dao and producer-consumer

* add dto and provate class data pattern

* fix #1646 png path problems

* fix #1646 composite png path case problem

* add abstract document pattern and version-number pattern

* add ambassador pattern

* add acyclic-visitor and api-gateway pattern

* add abstract-factory pattern

* add active-object pattern

* add aggregator-microservices and arrange-act-assert pattern

* update async-method-invocation pattern

* add balking and business-delegate pattern

* add bytecode and circuit-break pattern

* update arrange/act/assert pattern problems

* add csch pattern

* add language code, correct pic path

* #1805 update permalink

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
Co-authored-by: Mike <admin@xiaod.info>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2021-08-01 20:25:54 +05:30
d36efdbc7c TASK: Add language to yaml front matter (#1806) 2021-07-25 17:28:54 +05:30
3f654ab0c8 docs: add AndriyPyzh as a contributor for code (#1804)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-07-22 17:00:52 +03:00
eac85678f0 feature: Added Domain Model pattern (#1795)
* domain-model pattern

* fixed optional get before check isPresent

* readme minor changes

* change currency representation with joda money

* changed names of test methods

* fixed code smells

* Update domain-model/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update domain-model/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* updated readme and diagrams

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2021-07-22 16:58:21 +03:00
eaeb6e717c docs: add marlo2222 as a contributor for translation (#1798)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-07-09 10:47:34 +03:00
28fc672a2f translation: portuguese translation and languages codes (#1792)
* portuguese translation and languages codes

* fix unlinked links

Co-authored-by: Marlo Henrique de Lima Oliveira <marlo.oliveira@rsinet.com.br>
2021-07-09 10:44:06 +03:00
04bf566dc1 task: Explanations and grammar fixes for all the GoF patterns (#1791)
* Grammatical fixes to command pattern

* Update bridge pattern readme

* Fixes to builder pattern grammar

* Update chain of responsibility

* Improvements to the composite example

* Fixes to headings

* Minor updates to decorator pattern

* Update facade

* Update factory example

* Update factory method

* Update flyweight

* Interpreter explanation

* Update iterator readme

* Add explanation for mediator pattern

* Grammatical fixes to memento

* Grammar fixes for observer

* Update explanation for the prototype pattern

* Proxy pattern grammar fixes

* Update singleton

* Grammar fixes to state pattern

* Grammar fixes for strategy

* Grammar fixes, template method

* Grammar fixes for visitor

* Fix typo
2021-06-24 18:27:20 +05:30
bbdff14a66 Fix: Fixing License issue in MVVM pattern (#1701)
* Fixing License issue in MVVM pattern

* Updating LICENSE.md

* Updating pom.xml

* License header update to MVVM module only.

* Updating pom and removing gpl txt

* Adding gpl txt file

Co-authored-by: Jinisha <Jinisha@LAPTOP-VG38PNMC.fios-router.home>
2021-06-08 21:40:24 +03:00
eade10a98d docs: add samuelpsouza as a contributor (#1785)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-06-07 22:32:23 +05:30
43e7ca515a refactor: #1012 - Resolve Sonar report: missing assertions in several AppTest classes (#1784)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-06-07 22:30:44 +05:30
f6d43975fa docs: Grammatical fixes for Abstract Factory (#1782)
* Grammatical fixes

* Update abstract-factory/README.md

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-06-05 13:03:25 +05:30
c0d36894c2 docs: add Xenilo137 as a contributor (#1781)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-06-04 21:54:17 +03:00
6cf025447a fix: change 'swinged' to 'swung' in sword.java and hammer.java of bridge pattern (#1779)
* minor (non-coding) change

* Update Sword.java
2021-06-04 21:50:40 +03:00
dafe02f1be docs: add JuanManuelAbate as a contributor (#1780)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-06-04 21:39:47 +03:00
784cdee819 localizations: #1771 Spanish translation and languages codes (#1777)
* #1771 Move translations to a new directory to have more organization

* #1771 spanish translation

* #1771 change the language codes to follow ISO 639-1 and change the links

* #1771 remove country flags
2021-06-04 21:36:42 +03:00
5e434b783e fix: added license headers to newly created files (#1775) 2021-05-31 22:39:42 +03:00
f597fc1b07 fix: Fixed pages showing up in wrong language (#1752)
* Fix languages

* Missed change for version number

* Add language field for presentation

* Revert change in README for double buffer

Co-authored-by: Jackie Nim <=>
2021-05-19 19:49:05 +03:00
1b880c1818 docs: add tao-sun2 as a contributor (#1757)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-05-17 22:09:29 +03:00
Tao
e498c25675 feature: #1319 add table module pattern (#1742)
* modify table module pattern

* fix code smells

* resolve conversation

Co-authored-by: tao-sun2 <sustc18st@gmai.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2021-05-17 22:06:35 +03:00
122e6edb38 feature: resolve #1282 for Lockable Object pattern. (#1702)
* Added Lockable-Object pattern. Closes #1282.

* Refactor method name.

* Refactor sonar lint bugs.

* Added tests and enum Constants.

* Increase coverage.

* Changed @Data to Getters and Setters.

* Iluwatar's comment on pull request #1702.

* Fixed codes mells.

* Incremented wait time to 3 seconds.

* Reduced wait time to 2 seconds.

* Cleaned Code Smells.

* Incremented wait time, removed cool down.

* Refactored README.md file.

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-05-14 21:26:41 +05:30
ea3c9d955e docs: add EdisonE3 as a contributor (#1751)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-05-11 19:17:36 +05:30
f1feb3f6a0 feature: Implement Presentation Model Pattern (#1710)
* #415 initial all componets

* #415 add src and tests

* #415 add diagram

* #415 add README

* #415 add README

* #415 change pom.xml

* #415 change pom.xml

* #415 change pom.xml

* #415 update pom.xml

* #415 change some code smell

* #415 change some code smell

* #415 update test

* #415 add javadoc

* #415 remove author tag

* #415 add lombok @AllArgsConstructor

* #415 fix code converge

* #415 fix code converge

* #415 fix code converge

* #415 add javadoc

* #415 fix code smell

* #415 fix code smell

* #415 add log information

* #415 remove unused import

* #415 add javadoc and more test

* #415 modify test

* #415 fix checkstyle

* #415 remove useless code and add more javadoc and test.

* #415 add package-info.java.

* #415 add package-info.java.

* #415 add more test.

* #415 fix code smell.

* #415 fix code smell and increase code coverage.

* #415 fix code smell.

* #415 update README.md

* #415 update README.md

* #415 make this demo better

* #415 satisfy checkstyle

* #415 make some field static.

* #415 make some fields static.

* #415 rename some fields static.

* Delete package-info.java

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-05-11 19:16:11 +05:30
VR
1388e38744 docs: Correcting the URL to fix #1747 (#1748)
* Correcting the Hyperlink to redirect to the correct URL.
Corresponds to bug #1703

* Deleting the extra Hyphen(-) that was incorrectly added.

* Corrected the contributors inside the Readme file.

Updated the correct number of contributors to be in sync with `master`

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-05-11 16:30:30 +05:30
1dd26289e5 docs: add JackieNim as a contributor (#1749)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-05-09 17:00:47 +03:00
241a7ad9a2 docs: add DEV-VRUPER as a contributor (#1746)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-05-07 00:01:23 +05:30
VR
32b33480dd docs: Correcting the Hyperlink to redirect to correct URL. (#1745)
Corresponds to bug #1703

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-05-06 23:55:29 +05:30
068fa0371e docs: Translate some of the README docs into Chinese (#1744)
* docs: translated docs to zh

* docs: translated doc of sharding pattern to Chinese

* docs: translated doc of factory pattern to Chinese

* docs: translated doc of factory-kit pattern to Chinese

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-05-06 23:27:16 +05:30
b5aaa94794 docs: replace more suitable translation (#1743)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-05-03 20:25:57 +05:30
825b5a9a29 docs: translated the async method invocation pattern into Chinese (#1741) 2021-05-02 20:34:34 +03:00
31890f67e6 updated with neccessary changes (#1709) 2021-05-01 21:22:35 +03:00
41b1462eed [Security] Bump spring-webmvc from 5.0.13.RELEASE to 5.0.17.RELEASE (#1739)
Bumps [spring-webmvc](https://github.com/spring-projects/spring-framework) from 5.0.13.RELEASE to 5.0.17.RELEASE. **This update includes a security fix.**
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.0.13.RELEASE...v5.0.17.RELEASE)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-01 10:29:50 +05:30
276549d156 [Security] Bump jackson.version from 2.10.2 to 2.12.3 (#1738)
Bumps `jackson.version` from 2.10.2 to 2.12.3.

Updates `jackson-core` from 2.10.2 to 2.12.3
- [Release notes](https://github.com/FasterXML/jackson-core/releases)
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.10.2...jackson-core-2.12.3)

Updates `jackson-databind` from 2.10.2 to 2.12.3
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `jackson-annotations` from 2.10.2 to 2.12.3
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-01 10:29:05 +05:30
d67b625a74 docs: add STudio26 as a contributor (#1735)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-04-29 18:55:41 +05:30
1b14ebcbb1 Improve french translation, fix some typographic issues. (#1730)
* Improve french translation, fix some typographic issues.

* Improve french translation.

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-04-29 18:54:03 +05:30
a471ce25da translated the balking pattern into Chinese (#1727)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-04-29 18:51:14 +05:30
74caa0c4e5 docs: add Al-assad as a contributor (#1733)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-04-29 18:49:45 +05:30
53a294fee5 translated the business delegate pattern into Chinese (#1728)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-04-29 18:47:40 +05:30
a5062908c0 [Security] Bump commons-io from 2.6 to 2.7 (#1731)
Bumps commons-io from 2.6 to 2.7. **This update includes a security fix.**

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-29 18:39:54 +05:30
076310bb79 Bump commons-io from 2.6 to 2.7 (#1729)
Bumps commons-io from 2.6 to 2.7.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-27 13:36:24 +05:30
470d29e715 docs: Translated the strategy pattern into Korean (#1708)
* Correct README.md in Korean

Spelling correction and human-readable paraphrase on ko/README.md. Previously, it was translated using a machine translator.

* Add strategy pattern into Korean

Add and translate the strategy pattern into Korean.

* Remove source file from the translated folder

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-04-26 14:46:15 +05:30
74802e83b5 docs: add zWeBrain as a contributor (#1725)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-04-26 13:48:16 +05:30
09b577f634 task: Add Composite Entity pattern (#1705)
* add composite entity pattern

* add composite entity pattern

* Update ReactorTest.java

* resolve some code quality problems

* modified a lot

* remove some extra codes

* modified README

* removed the author name and adjusted the spacing

Co-authored-by: zwebrain <11811721@mail.sustech.edu.cn>
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-04-26 13:45:52 +05:30
2fce2e44e2 docs: Chinese translations updates (#1706)
* add state and callback pattern

* add command and template-method pattern

* add iterator pattern

* add bridege and DI pattern

* fix issue #1600

* add converter,proxy,visitor pattern

* add caching,composite,delegation,dirty-flag,interpreter patterns

* add dao and producer-consumer

* add dto and provate class data pattern

* fix #1646 png path problems

* fix #1646 composite png path case problem

* add abstract document pattern and version-number pattern

* add ambassador pattern

* add acyclic-visitor and api-gateway pattern

* add abstract-factory pattern

* add active-object pattern

* add aggregator-microservices and arrange-act-assert pattern

Co-authored-by: Mike <admin@xiaod.info>
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2021-04-26 13:28:01 +05:30
b3a1749bd0 docs: add eas5 as a contributor (#1711)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-04-26 13:06:33 +05:30
af0ccdc6e1 refactoring: Added parameterization to enumeration test (#1698)
Signed-off-by: Elvys Soares <eas5@cin.ufpe.br>

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-04-22 11:47:45 +05:30
323dd63e66 update distribution for java to 'adpot' (#1699) 2021-04-18 12:53:19 +03:00
be3250bd0d Set version for the next development iteration 2021-04-05 14:57:36 +03:00
1222f12b99 Set version number for milestone 1.24.0 2021-04-05 14:56:36 +03:00
965d38f139 docs: add ohbus as a contributor (#1695)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2021-03-28 18:20:04 +03:00
eb8f9db575 #590 add explanation for caching pattern (#1693)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-03-28 16:32:29 +05:30
6d7084f18d remove labelling trigger (#1692) 2021-03-28 10:15:42 +03:00
74f5cfa670 docs: add jinishavora as a contributor (#1688)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-03-23 14:12:32 +05:30
b525d871b4 docs: Fix mvvm readme (#1689) 2021-03-23 11:29:20 +05:30
c413e0902e docs: #590 add explanation for bytecode pattern (#1687)
Type: docs and refactoring

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-03-22 12:19:46 +05:30
7ac468db20 docs: #590 refactor and add explanation for business delegate (#1686)
Type: docs and refactoring

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-03-22 12:04:56 +05:30
794795acf5 task: MVVM design pattern using zkoss framework. (#1678)
* MVVM design pattern using zkoss framework.

* MVVM Design pattern updates for issues reported by SonarCloud.

* MVVM Design pattern updates for coverage issues reported by SonarCloud.

* MVVM Design pattern updates for coverage issues (removing lombok @Data)
reported by SonarCloud.

* MVVM Design pattern updates for coverage issues reported by Sonar - TEST
cases added for Equals and ToString

* MVVM Design Pattern - updating missing/todo details.

* MVVM Design Pattern - adding lombok.config

* MVVM Design Pattern - Removing xml, updating pom.xml and README as per
suggested changes in code review

* Update model-view-viewmodel/README.md

* Update model-view-viewmodel/README.md

* Update model-view-viewmodel/README.md

* Update model-view-viewmodel/README.md

* MVVM Design Pattern - Updated pom.xml and Readme based on Suggested
changes

* added type as xml

* MVVM Design Patterm - root pom.xml and module pom.xml updated

* Update pom.xml

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2021-03-22 11:43:34 +05:30
2b7d181ac4 docs: add explanation for balking pattern (#1685)
* #590 explanation for balking pattern

* #590 fix checkstyle error

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-03-21 01:25:47 +05:30
b5ed8b2278 labeling PR should trigger builds again for all-contributors bot (#1682) 2021-03-18 22:22:37 +02:00
8fc64a2d38 docs: add qfxl as a contributor (#1681)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-03-18 22:13:28 +02:00
7e91322a43 Add explanation to Async Method Invocation pattern (#1680)
* #590 make the example more interesting and add an explanation

* #590 fix checkstyle

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-03-18 11:07:34 +05:30
e9106ccfc5 fix spelling errors (#1679)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-03-18 10:49:45 +05:30
77ffae5ecc Format active object README.md to display correctly on the web site 2021-03-14 16:26:24 +02:00
74abc7a0d6 added license headers to active object pattern (#1676) 2021-03-14 16:08:53 +02:00
ccf350b611 docs: add noamgrinch as a contributor (#1675)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-03-14 16:07:39 +02:00
c8a2ef01d3 pattern: Active-Object pattern. (#1660)
* Closes #65.

* Removed

* Removed unnecessary files. Added logging. Closes Fixes #1660.

* Added Terminition condition.

* Logger implemented. Removed maven wrapper.

* Added module to parent POM. removed .gitignore

* Replaced tabs with whitespaces, added Javadocs.

* Fixed more whitespaces problems.

* Fixed more checkstyle errors

* More checkstyle errors.

* Checkstyle errors.

* Final checkstyle cleanup

* Added UML file. Changed System.exit() to Runtime.

* Changed buisiness logic and readme.md file

* Changed typos and readme.md file

* Fixed checkstyle errors

* Fixed grammer errors and CircleCI bugs.

* Wrong readme.md

* Added Thread.interrupt() for after catching exception.

* Fixed SonarCloud code smells.

* Removed unused brackets.

* Changed main program exit logic. Added tests.

* Reverted abstract-factory

* Cleaned code

* Added static to loggers. cleaned code smells.

* Checkstyle errors.

* Code Smells.

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-03-14 11:53:41 +05:30
cbf1847425 docs: add va1m as a contributor (#1674)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-03-13 14:31:37 +02:00
5cf2fe009b 📍Use lombok, reformat, and optimize the code (#1560)
* Use lombok, reformat, and optimize the code

* Fix merge conflicts and some sonar issues

Co-authored-by: va1m <va1m@email.com>
2021-03-13 14:19:21 +02:00
0e26a6adb5 Use property to set version and update dependencies (#1671)
* formatting and versioning

* updated versions

* reverted checkstyle plugin version
2021-03-07 19:16:50 +02:00
b423002e6c updated Random() to SecureRandom() (#1670)
* updated Random() to SecureRandom()

* batch 2 of SecureRandom updates
2021-03-06 13:26:02 +02:00
CF
c150871a94 Update to JUnit5 across all modules (#1668)
* Updated saga to JUnit 5

* Update fix for CI job in trampoline module

* Updated update-method module to JUnit 5

* Upgraded to latest JUnit Jupiter
JUnit 4 is not needed when using JUnit-Vintage

* Reverted change to access modifier on Trampoline

* Cleanup to resolve code smells

* Formatting

* Formatting

* Migrating to JUnit5 and updating some Mockito patterns

* Migrating to JUnit5

* Migrating to JUnit5

* Migrating to JUnit 5

* Formatting cleanup

* Added missing scope for junit

* Fixed tests that were not running previously.

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-03-06 14:42:46 +05:30
e9d0b3e98c remove labeling trigger for PR and actions set to master (#1666) 2021-03-05 19:51:09 +02:00
CF
903453229c Updated update-method module to JUnit 5 (#1542)
* Updated saga to JUnit 5

* Update fix for CI job in trampoline module

* Updated update-method module to JUnit 5

* Upgraded to latest JUnit Jupiter
JUnit 4 is not needed when using JUnit-Vintage

* Reverted change to access modifier on Trampoline

* Cleanup to resolve code smells

* Formatting

* Formatting

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-03-04 10:49:31 +05:30
c3c90e2bd4 created CircleCI config for sonar analysis (#1664)
* created sonar config

#1663

* updated license headers

* xvfb to run tests

* updated circle image to enable css and JS analysis
2021-03-01 16:50:34 +02:00
268e4148b4 #1625 add Turkish translation for singleton design pattern (#1665)
Co-authored-by: Halil Demir <halil.demir@zalando.de>
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-03-01 19:20:06 +05:30
0220f3df12 docs: add richardmr36 as a contributor (#1662)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-02-28 11:51:47 +02:00
846d05672a #1638 Add Parameter Object pattern (#1650)
* #1638 Add Parameter Object pattern

* #1638 Fix comments and formatting for Parameter Object pattern

* #1638 Fix formatting, commenting, remove string concatenation in Parameter Object pattern

* #1638 Fix readme formatting and log parameter object
2021-02-28 11:42:48 +02:00
03bc4a6b9a update CI badge (#1658) 2021-02-21 15:21:11 +02:00
cda2675221 Upgrade jacoco (#1657)
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-02-16 12:27:11 +05:30
a79bed9a46 #1655: added maven wrapper (#1656)
Addresses Point 1 and 2
2021-02-15 17:13:06 +02:00
7c01bc7464 format readme.md 2021-02-14 23:43:33 +02:00
edbea7d50b format readme.md 2021-02-14 23:33:40 +02:00
d2f926e3e8 format readme.md 2021-02-14 23:23:05 +02:00
fc837e289f format readme.md 2021-02-14 23:01:05 +02:00
fce8d25736 format readme.md 2021-02-14 22:51:42 +02:00
cbffcb28c8 #455 Static content hosting cloud pattern (#1654)
* #455 work on readme.md

* #455 work on readme.md

* #455 S3 web site complete

* #455 add cloudfront and diagram

* Apply suggestions from code review

added syntax highlighting

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-02-15 01:42:21 +05:30
7891c2b117 update inception year to 2021 (#1653) 2021-02-14 11:57:57 +02:00
b3fc60fe92 update .gitignore (#1651)
* updated factorypath

* updated gitignore
2021-02-14 11:03:13 +02:00
2207ea4ce9 Translation zh (#1646)
* add state and callback pattern

* add command and template-method pattern

* add iterator pattern

* add bridege and DI pattern

* fix issue #1600

* add converter,proxy,visitor pattern

* add caching,composite,delegation,dirty-flag,interpreter patterns

* add dao and producer-consumer

* add dto and provate class data pattern

* fix #1646 png path problems

* fix #1646 composite png path case problem

Co-authored-by: Mike <admin@xiaod.info>
Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-02-08 21:07:48 +05:30
934578d6d2 docs: add moustafafarhat as a contributor (#1649)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-02-07 17:04:21 +02:00
cdc2a154df Arabic Translation - Initialization part (#1648) 2021-02-07 17:00:48 +02:00
d620dbbc05 bump version to 3.8.0.2131 (#1647)
earlier version 3.7.0.1746
org.sonarsource.scanner.maven.sonar-maven-plugin
2021-02-07 16:55:52 +02:00
a86bdfd14d Update link title 2021-01-30 14:54:14 +02:00
7408620a71 Update image filenames 2021-01-30 14:44:41 +02:00
a94737075e Minor fixes to readmes 2021-01-30 14:16:35 +02:00
3f09fb70bb Clear Sonar Blockers (#1643)
* remove debt from CachingTest

https://sonarcloud.io/project/issues?fileUuids=AW3G0SevwB6UiZzQNqXR&id=iluwatar_java-design-patterns&open=AXK0Ozo--CiGJS70dLl0&resolved=false
 
Signed-off-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* fixed few debts for Spatial Partition module

Mainly convertig Hashtable to HashMaps

Signed-off-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* fixed some logger norms

Signed-off-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>

* fixed few errors as it got mixed with the stash

Signed-off-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-01-30 13:37:52 +02:00
663dbd298e Update License year to 2021 (#1639)
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2021-01-30 12:53:28 +02:00
8a9e26e77a docs: add byoungju94 as a contributor (#1642)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-01-30 12:46:40 +02:00
462b581b34 clearing Sonar Blockers (#1633)
* update gitignore

.checkstyle files are being tracked which should not be

* NOSONAR for statement

excluded from SONAR analysis as it is already dealt using functional approach

https://sonarcloud.io/project/issues?id=iluwatar_java-design-patterns&issues=AW8FwRBhm8eoEVQR-x0f&open=AW8FwRBhm8eoEVQR-x0f

* achieved thread safety with lazy initialization

https://sonarcloud.io/project/issues?fileUuids=AXb6t0PKusn4P8Tm-LmM&id=iluwatar_java-design-patterns&open=AXb6t19yusn4P8Tm-Lmo&resolved=false

* remove double checked locking and initialize before using

https://sonarcloud.io/project/issues?fileUuids=AXb6t0PKusn4P8Tm-LmK&id=iluwatar_java-design-patterns&open=AXb6t19qusn4P8Tm-Lmk&resolved=false

* NOSONAR for the line

https://sonarcloud.io/project/issues?id=iluwatar_java-design-patterns&issues=AXPd3iSe46HRSze7cz3D&open=AXPd3iSe46HRSze7cz3D

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2021-01-27 16:24:06 +02:00
9abfd5777c docs: add rohit10000 as a contributor (#1637)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-01-26 22:22:48 +02:00
b9da15dda3 issue 1628 handled, removed mutex and semaphore from catalog. (#1634)
* issue 1628 handled, removed mutex and semaphore from catalog.

* issue1634, modules still exiting in pom.xml

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-01-26 22:19:36 +02:00
0010fb55c5 Merge data transfer object examples (#1635)
* #1617 merge dto pattern examples

* #1617 update license headers

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-01-25 09:05:04 +05:30
3adc3cda05 update gitignore (#1632)
.checkstyle files are being tracked which should not be
2021-01-24 11:17:05 +02:00
18a1a725ee #1469 Add lambda expressions implementation for Strategy Pattern (#1631)
* #1469 Add Strategy Pattern lambda implementation

After Java 8.
Also take advantage of enum

* #1469 Update class diagrams

* #1469 Update README.md

Add lambda programmatic example

* #1469 Remove unused imports

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-01-19 12:06:26 +05:30
25ed2540f4 docs: add demirhalil as a contributor (#1630)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-01-16 21:00:23 +02:00
aa46e119d6 Fix flag image size 2021-01-16 20:55:20 +02:00
7e56491e92 #1625 Turkish translation - initialization part (#1629)
* #1625 init Turkish translation and add the flag

* #1625 update the Main README.md for Turkish translation

* #1625 add Turkish translation for README.md

Co-authored-by: Halil Demir <halil.demir@zalando.de>
2021-01-16 20:49:35 +02:00
6918a4bac2 docs: add ignite1771 as a contributor (#1626)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-01-13 13:31:11 +05:30
dea7ecfb7a #1317 Special Case Pattern (#1624)
* #1317 Add Special Case Pattern

To focus on pattern itself, I implement DB and
maintenance lock by the singleton instance.

* #1317 Add special cases unit tests

Assert the logger output
(ref: https://stackoverflow.com/a/52229629)

* #1317 Add README.md

Add Special Case Pattern README

* #1317 Format: add a new line to end of file

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-01-13 13:06:21 +05:30
bbc4fdfc24 docs: add tkhadir as a contributor (#1623)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-01-04 19:42:58 +05:30
829cd41455 #1620 french translation - initialization part (#1622)
* 🚀 init fr translation

* #1620 evo add french translation - main part

* #1620 evo add french translation - main part

* #1620 evo french translation - add french flag

* Update README.md

* Update README.md

* #1620 add cn and kr flags

* Update README.md

* Update README.md

* Update README.md

* Update README.md
2021-01-04 19:27:32 +05:30
85a05dd718 docs: add warp125 as a contributor (#1619)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-12-20 20:20:51 +02:00
0c66e48d81 README.md translated into Korean (#1582)
* Translate README.md via GitLocalize

* Translate README.md via GitLocalize

* Update README.md

* Translate README.md via GitLocalize

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Translate README.md via GitLocalize

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Translate README.md via GitLocalize

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Translate README.md via GitLocalize

* Update README.md

Co-authored-by: mt-gitlocalize <mt@gitlocalize.com>
2020-12-20 20:18:23 +02:00
801006337a docs: add ruchpeanuts as a contributor (#1618)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-12-13 17:35:37 +02:00
2aa4c963eb Update README.md (#1598)
Factory method is updated with real world examples
2020-12-13 17:33:43 +02:00
8632962362 docs: add siavashsoleymani as a contributor (#1616)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2020-12-09 13:11:15 +05:30
5bc61c8c28 #1569 DTO pattern implementation using Enums (#1570)
* #1569 DTO pattern implemented using Enums

* #1569 DTO pattern implemented using Enums

* #1569 adding some java docs

* #1569 some changes in java doc and code style

* #1569 some changes in java doc and code style

* #1569 some changes in java doc and code style

* #1569 some changes in java doc and code style

* #1569 adding suggested extra line

* #1569 license added to pom.xml

* #1569 more checkstyle problems resolved

* #1569 more checkstyle problems resolved

* #1569 more checkstyle problems resolved

Co-authored-by: siavashsoleymani <siavash.soleimani@snapp.cab>
Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2020-12-09 12:51:24 +05:30
a94615ac54 docs: add viveksb007 as a contributor (#1613)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-12-08 10:58:39 +05:30
14c4710435 Implemented Registry pattern (#1543)
* #1310 Implemented registry pattern

* fixed parent pom version

* added empty line in registry.urm.puml

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2020-12-08 10:34:42 +05:30
428cbc1027 docs: add jeff303 as a contributor (#1612)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-12-07 20:25:59 +02:00
a118a995ec docs: add omk13 as a contributor (#1611)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-12-07 19:58:05 +02:00
759c99d078 JUnit4 to JUnit5 (#1589)
* Getting @Test from JUnit5 instead of JUnit4

* Changed FixedStepGameLoopTest.java imports and tests to JUnit5

* JUnit4 to JUnit5

* JUnit4 to JUnit5

* JUnit4 to JUnit5

* JUnit4 to JUnit5
2020-12-07 19:55:13 +02:00
e9f73bcf0b Translation zh (#1610)
* add state and callback pattern

* add command and template-method pattern

* add iterator pattern

* add bridege and DI pattern

* fix issue #1600

Co-authored-by: Mike <admin@xiaod.info>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2020-12-06 16:13:48 +02:00
29ceac2fb0 Update README.md (#1592) 2020-12-05 10:56:00 +02:00
7255c2c5e7 docs: add Anurag870 as a contributor (#1609)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

* Update README.md

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2020-12-05 10:50:09 +02:00
68308dc550 Update README.md (#1590) 2020-12-05 10:34:49 +02:00
1e10951c23 Translation zh (#1597)
* add state and callback pattern

* add command and template-method pattern

* add iterator pattern

Co-authored-by: Mike <admin@xiaod.info>
2020-12-04 20:03:14 +02:00
f3c876ed2e Merge pull request #1607 from iluwatar/all-contributors/add-gkulkarni2020
docs: add gkulkarni2020 as a contributor
2020-12-04 15:48:40 +02:00
ecd1a5d07f docs: update .all-contributorsrc [skip ci] 2020-12-04 13:47:58 +00:00
8b15c24753 docs: update README.md [skip ci] 2020-12-04 13:47:57 +00:00
f5a6161044 Merge pull request #1604 from gkulkarni2020/master
Word mistake in factory/README.md #1601
closes #1601
2020-12-04 14:17:32 +05:30
76eefa80b5 Merge branch 'master' into master 2020-12-04 13:30:11 +05:30
c282ab80fd Merge pull request #1606 from iluwatar/all-contributors/add-ibrahimAlii
docs: add ibrahimAlii as a contributor
2020-12-01 22:48:24 +02:00
1edfb44642 docs: update .all-contributorsrc [skip ci] 2020-12-01 20:47:33 +00:00
e185c497ac docs: update README.md [skip ci] 2020-12-01 20:47:32 +00:00
d5a054c1f8 Merge pull request #1605 from iluwatar/all-contributors/add-OrangePants-R
docs: add OrangePants-R as a contributor
2020-11-30 16:57:52 +02:00
ced7a9deb0 docs: update .all-contributorsrc [skip ci] 2020-11-30 14:57:00 +00:00
90c6cf94d5 docs: update README.md [skip ci] 2020-11-30 14:56:59 +00:00
996bd937fb Merge pull request #1576 from OrangePants-R/master
issue 525: attach tutorialspoint link to iterator pattern
2020-11-30 16:55:19 +02:00
7931471b99 Word mistake in factory/README.md #1601 2020-11-30 15:26:01 +05:30
b8ecbaa451 Merge pull request #1603 from iluwatar/all-contributors/add-grzesiekkedzior
docs: add grzesiekkedzior as a contributor
2020-11-28 15:09:18 +02:00
fb4df48cb3 Merge branch 'master' into all-contributors/add-grzesiekkedzior 2020-11-28 15:08:15 +02:00
96fadf3bd7 docs: update .all-contributorsrc [skip ci] 2020-11-28 13:04:26 +00:00
dd599595cc docs: update README.md [skip ci] 2020-11-28 13:04:25 +00:00
fcd7785f0d Merge pull request #1568 from ohbus/master
Update Pull Requests CI trigger behaviour
2020-11-28 14:38:00 +02:00
2432d120b4 Merge pull request #1602 from iluwatar/all-contributors/add-eimanip
docs: add eimanip as a contributor
2020-11-28 14:25:41 +02:00
4b18e223cd docs: update .all-contributorsrc [skip ci] 2020-11-28 12:24:58 +00:00
13c6de036f docs: update README.md [skip ci] 2020-11-28 12:24:57 +00:00
6f979d0cb2 Fix version number class diagram not showing 2020-11-24 08:10:34 +02:00
f084f8bf41 Merge pull request #1599 from iluwatar/all-contributors/add-manannikov
docs: add manannikov as a contributor
2020-11-23 22:38:24 +02:00
6c95868b8d docs: update .all-contributorsrc [skip ci] 2020-11-23 20:37:49 +00:00
4c7f1b7822 docs: update README.md [skip ci] 2020-11-23 20:37:48 +00:00
0c44b53909 Merge pull request #1563 from manannikov/Issue#1284
#1284 Implement Version Number pattern
2020-11-23 22:35:43 +02:00
9ead3adf73 #1284 Divide tests 2020-11-23 20:59:00 +02:00
97e3a3debc #1284 Use local variable inference 2020-11-23 19:42:50 +02:00
43ed09015d Add missing license header 2020-11-22 21:14:53 +02:00
7eee546208 Update README.md 2020-11-08 19:39:21 +02:00
dc31960710 Remove unused logger objects 2020-11-08 19:37:15 +02:00
7c0fdad5a2 Merge pull request #1531 from ravening/command-functional
Refactor the command pattern to use lambda functions
2020-11-08 19:33:48 +02:00
5a8933ea17 Merge pull request #1534 from swarajsaaj/#1510-Circuit-Breaker-Refactoring
#1510 Improvements done in Circuit Breaker
2020-11-07 20:04:47 +02:00
d02233f0b7 Merge pull request #1594 from iluwatar/all-contributors/add-akashchandwani
docs: add akashchandwani as a contributor
2020-11-07 14:36:54 +02:00
d42bcab9fc docs: update .all-contributorsrc [skip ci] 2020-11-07 12:34:36 +00:00
77b2ff2150 docs: update README.md [skip ci] 2020-11-07 12:34:35 +00:00
cff072d1ca Merge pull request #1593 from iluwatar/all-contributors/add-dsibilio
docs: add dsibilio as a contributor
2020-11-07 14:34:08 +02:00
80ba0407db docs: update .all-contributorsrc [skip ci] 2020-11-07 12:33:11 +00:00
6a09b909f2 docs: update README.md [skip ci] 2020-11-07 12:33:10 +00:00
53ccc0e7e6 Merge pull request #1548 from dsibilio/patch-1
Add missing word to README.md
2020-11-07 14:31:26 +02:00
a7a8e23b01 Merge pull request #1591 from iluwatar/all-contributors/add-Ascenio
docs: add Ascenio as a contributor
2020-11-07 09:49:20 +02:00
2783251d00 docs: update .all-contributorsrc [skip ci] 2020-11-07 07:47:42 +00:00
ac432968ae docs: update README.md [skip ci] 2020-11-07 07:47:41 +00:00
26b5364cbd issue 525: attach tutorialspoint link to iterator pattern 2020-10-19 11:24:39 -06:00
f006782805 Merge pull request #1529 from mookkiah/issue_1500
issue 1500 - using JUnit 5 and resolved a build issue
2020-10-17 18:02:56 +03:00
38cc490e3f update namespaces of different steps of build job 2020-10-17 10:14:49 +05:30
911cfd64af Update maven-pr-builder.yml 2020-10-16 09:36:02 +05:30
2332520d67 #1284 Implement Version Number pattern 2020-10-13 20:17:25 +03:00
af1b611136 code refactor 2020-10-13 17:36:59 +02:00
4ff196ce35 Refactor the command pattern to use lambda functions
We can leverage the lambda expressins of Java 8 onwards
to implement command design pattern instead of traditional
non functional way
2020-10-13 16:45:19 +02:00
242ae6a412 #1510 Update class diagram 2020-10-11 00:22:28 +05:30
b689fe0a26 #1510 Fix comment length 2020-10-11 00:11:06 +05:30
7aea765dd1 #1510 Fix review comments 2020-10-10 23:57:53 +05:30
ea49cbfe94 Merge branch 'master' into #1510-Circuit-Breaker-Refactoring 2020-10-10 22:19:46 +05:30
1f4a412e70 Merge pull request #1535 from ohbus/master
Cache SonarCloud packages
2020-10-10 18:51:00 +03:00
36d0a3718c Update README.md
Missing word in sentence.
2020-10-06 18:24:47 +02:00
195a735814 #508 fix SpaceStationMir logging 2020-10-04 14:50:48 +03:00
633d45aa67 Fix typo 2020-10-04 14:33:01 +03:00
adc267e48e Merge pull request #1526 from xiaod-dev/translation-zh
Translation zh
2020-10-04 14:26:39 +03:00
cc8d209c22 Merge pull request #1545 from iluwatar/all-contributors/add-ChFlick
docs: add ChFlick as a contributor
2020-10-04 14:24:48 +03:00
578b3528d5 docs: update .all-contributorsrc [skip ci] 2020-10-04 11:23:50 +00:00
5674f3c52e docs: update README.md [skip ci] 2020-10-04 11:23:49 +00:00
4ad2bfefad Merge pull request #1525 from ChFlick/patch-1
Fix links on the event sourcing page
2020-10-04 14:21:25 +03:00
e5d219609d Add missing license headers 2020-10-04 14:17:28 +03:00
21ca47a22e Fix build 2020-10-04 14:17:10 +03:00
ebd38bcfaa Update license header 2020-10-04 14:09:36 +03:00
a3753807ae add Caching of SonarCloud packages 2020-10-01 22:23:43 +05:30
64266d63fd Merge pull request #1 from iluwatar/master
Update README.md
2020-10-01 22:18:53 +05:30
4f62070eb2 #1510 Revert pom to include all modules 2020-10-01 21:13:30 +05:30
b29bd66369 #1510 Improvments done in Circuit Breaker 2020-10-01 21:09:39 +05:30
ad435dd2fd issue 1500 - using Junit 5 and resolved a build issue 2020-09-27 09:26:19 -04:00
a125879d15 Update README.md 2020-09-26 13:01:58 +03:00
dac8e659ce add facade pattern 2020-09-22 16:50:46 +08:00
a1515b3b52 finish builder and chain pattern 2020-09-22 11:13:25 +08:00
d2e070d21d Fix links on the event sourcing page 2020-09-16 13:44:50 +02:00
82eb41b641 Update README.md 2020-09-13 18:35:23 +03:00
24e8fa1bad Update README.md 2020-09-13 18:32:12 +03:00
9017975276 Update README.md 2020-09-13 18:26:52 +03:00
87093cf221 Update README.md 2020-09-13 18:23:54 +03:00
6cb5b4a683 Update README.md 2020-09-13 18:19:35 +03:00
e6ddff5f25 Update README.md 2020-09-13 18:15:17 +03:00
b5fddd469a Update README.md 2020-09-13 18:09:41 +03:00
9cbc509c3a Update README.md 2020-09-13 18:09:18 +03:00
9c648cbdb8 Update README.md 2020-09-13 18:04:30 +03:00
e6cca86e25 Update README.md 2020-09-13 17:59:12 +03:00
c204b242df Update README.md 2020-09-13 17:53:50 +03:00
2e98dcf217 Update README.md 2020-09-13 17:39:10 +03:00
9d44eea64f Merge pull request #1524 from iluwatar/all-contributors/add-swarajsaaj
docs: add swarajsaaj as a contributor
2020-09-13 17:24:32 +03:00
6f592f5e8a docs: update .all-contributorsrc [skip ci] 2020-09-13 14:23:53 +00:00
74b968942f docs: update README.md [skip ci] 2020-09-13 14:23:52 +00:00
ebc0e8b3cd Merge pull request #1522 from swarajsaaj/master
#1313 Add Separated Interface pattern
2020-09-13 17:21:28 +03:00
9088ac51f6 #1313 Rename DomesticTax,ForeignTax and review fixes 2020-09-12 22:35:40 +05:30
c8f7a8f0e6 Merge pull request #1523 from iluwatar/all-contributors/add-vdlald
docs: add vdlald as a contributor
2020-09-12 20:02:32 +03:00
c63af2ccbf docs: update .all-contributorsrc [skip ci] 2020-09-12 17:00:59 +00:00
9f3f5322d2 docs: update README.md [skip ci] 2020-09-12 17:00:58 +00:00
5607a4974c Merge pull request #1517 from vdlald/847
847
2020-09-12 19:57:29 +03:00
93aa1046aa translate decorator and factory method pattern in Chinese 2020-09-11 09:34:11 +08:00
a2967c5a40 #1313 Add documentation and license header 2020-09-10 03:22:00 +05:30
7fd7735527 #1313 Add separated-interface module to parent pom 2020-09-10 03:10:58 +05:30
f6942cf18d #1313 Add Separated Interface design pattern 2020-09-10 02:57:56 +05:30
ef326ee77e Update README.md 2020-09-06 19:56:07 +03:00
8b5f532a50 Update README.md 2020-09-06 19:55:38 +03:00
a1da1e4973 Cleanup factory 2020-09-06 19:46:13 +03:00
9d21dff855 Merge pull request #1520 from iluwatar/all-contributors/add-ravening
docs: add ravening as a contributor
2020-09-06 19:39:08 +03:00
9d75592e8b Merge branch 'master' into all-contributors/add-ravening 2020-09-06 19:38:44 +03:00
8d6738b729 docs: update .all-contributorsrc [skip ci] 2020-09-06 16:37:04 +00:00
3205dc2cf0 docs: update README.md [skip ci] 2020-09-06 16:37:03 +00:00
16e1863ae7 Merge pull request #1519 from iluwatar/all-contributors/add-samilAyoub
docs: add samilAyoub as a contributor
2020-09-06 19:36:35 +03:00
b9db3c4763 docs: update .all-contributorsrc [skip ci] 2020-09-06 16:35:58 +00:00
d72206ba72 docs: update README.md [skip ci] 2020-09-06 16:35:57 +00:00
922c699e49 Merge pull request #1516 from samilAyoub/add-simple-factory
Add Simple Factory Pattern implementation
2020-09-06 19:33:03 +03:00
bab48efd7c fix style 2020-09-06 12:01:48 +03:00
29eecfd048 forgot to run the App 2020-09-06 11:52:16 +03:00
87cf6b791c refactor 2020-09-06 11:48:40 +03:00
2e36a11e24 remove lombok, related to #1503 2020-09-06 11:42:39 +03:00
bf41b1d9c9 Updates README.md:
- Adding class diagram
- Adding Pros and Cons
- replace "" with ''
2020-09-05 18:39:28 +01:00
b3ef214cd6 Change tabs to spaces in pom.xml 2020-09-04 22:02:19 +01:00
6caf78e4e5 updates :
- Using lambda expression to create cars
- Using spaces instead of tabs in pom.xml
2020-09-04 21:21:51 +01:00
bd48d6ce10 refactor 2020-09-04 17:31:50 +03:00
8b26452c75 bug fixing 2020-09-03 22:58:15 +01:00
2bb252e08f Clean the code 2020-09-03 22:41:55 +01:00
a023cfbb1a Merge branch 'master' into add-simple-factory 2020-09-03 22:26:49 +01:00
badf0c6b8c - README.md is added
- Change the name to factory is done
- Local variable type inference is used
2020-09-03 22:08:54 +01:00
c9718a5227 add README file 2020-09-03 21:08:28 +01:00
e89042a782 remove boilerplate code 2020-09-03 20:04:47 +03:00
fb890e80dd refactor 2020-09-03 20:02:52 +03:00
b423fd30d4 Fix bugs, clean the code and add unit tests. 2020-09-02 18:12:42 +01:00
3df8472bf8 Merge pull request #1515 from fedorskvorcov/fix-typo
Remove unnecessary word from text
2020-09-02 19:59:07 +03:00
ac98b31b68 Add Maven Assembly plugin to pom.xml 2020-09-02 14:09:44 +01:00
46b23f322f Add Simple Factory Pattern implementation
Java source code demonstrate simple factory design pattern
2020-09-02 13:46:53 +01:00
e231cd8d1a Remove unnecessary word from text 2020-09-02 12:32:02 +03:00
19378f3fdd Update README.md 2020-09-01 20:25:39 +03:00
3f4d637510 Update README.md 2020-09-01 20:18:10 +03:00
25cca3547d Update README.md 2020-09-01 20:06:47 +03:00
b9b6777d15 Update README.md 2020-09-01 19:55:22 +03:00
2a5b8c977a Merge pull request #1514 from iluwatar/all-contributors/add-fedorskvorcov
docs: add fedorskvorcov as a contributor
2020-09-01 16:40:23 +03:00
daa94c7b6d docs: update .all-contributorsrc [skip ci] 2020-09-01 13:39:33 +00:00
7aca64a3c9 docs: update README.md [skip ci] 2020-09-01 13:39:32 +00:00
6628bccecc Merge pull request #1513 from fedorskvorcov/fix-typo
Fix typo in comment
2020-09-01 16:38:44 +03:00
aebdb88a83 Fix typo in comment 2020-09-01 09:51:46 +03:00
9c0c17b87a Merge pull request #1512 from xiaod-dev/translation-zh
Translation zh
2020-08-31 20:17:39 +03:00
20fac32ac2 finish Chinese translation of observer and strategy 2020-08-31 17:18:59 +08:00
82842d614b Update README.md 2020-08-30 20:08:34 +03:00
9b71479d04 Update README.md 2020-08-30 19:34:10 +03:00
3c4ae6c4ca Update README.md 2020-08-30 19:17:45 +03:00
9ff42389c6 Merge pull request #1511 from ohbus/master
Configure build to disable shallow clone
2020-08-30 11:52:13 +03:00
b80b9354c6 Update maven-ci.yml 2020-08-30 02:31:06 +05:30
67d1d16e1f Update README.md 2020-08-29 22:13:55 +03:00
bc35911475 Update README.md 2020-08-29 22:02:10 +03:00
b5c6a89ec9 Update README.md 2020-08-29 21:55:51 +03:00
74360a7ecb Update README.md 2020-08-29 21:51:32 +03:00
3544a8366f Update README.md 2020-08-29 21:38:58 +03:00
bcca9beb4d Update README.md 2020-08-29 21:29:15 +03:00
6606d6cd08 Update README.md 2020-08-29 21:21:01 +03:00
f3fd49870c Update README.md 2020-08-29 21:05:30 +03:00
1fbef60f37 Update README.md 2020-08-29 21:00:17 +03:00
b77a05f0fb Update README.md 2020-08-29 20:46:40 +03:00
0ee03db4d0 Update README.md 2020-08-29 20:38:04 +03:00
c541176b38 Update README.md 2020-08-29 20:26:37 +03:00
b53856b64f Merge pull request #1509 from ohbus/master
Cleaning up unnecessary code from the CI yaml and CI server version upgrade
2020-08-29 20:19:42 +03:00
1973d1bc63 Update maven-pr-builder.yml
upgraded build server runtime from Ubuntu 18.04 to 20.04 LTS for the PR builder as well
2020-08-29 19:35:20 +05:30
f5886325ec Update maven-ci.yml
upgraded build server runtime from Ubuntu 18.04 to 20.04 LTS
2020-08-29 19:34:43 +05:30
8afe4c314a Update README.md 2020-08-29 16:56:52 +03:00
2dd2cfb8ca Update README.md 2020-08-29 16:49:45 +03:00
8512c65aef Update README.md 2020-08-29 16:42:46 +03:00
6373f7b115 Update README.md 2020-08-29 16:38:20 +03:00
e8b42bd135 Update README.md 2020-08-29 16:23:28 +03:00
2bb2134636 Update README.md 2020-08-29 16:17:15 +03:00
675b2f14b2 Update README.md 2020-08-29 16:10:59 +03:00
338c146c78 Update maven-pr-builder.yml 2020-08-29 17:39:50 +05:30
8135dbecdb Update maven-ci.yml 2020-08-29 17:36:31 +05:30
a4f2d14848 Update README.md 2020-08-29 12:01:23 +03:00
96c16a8f3a Update README.md 2020-08-29 11:29:30 +03:00
47e746c3ba Update maven-pr-builder.yml
removed the if checking block for building Pull Requests as this was redundant code.
2020-08-28 12:26:27 +05:30
7118ccafa9 Update maven-ci.yml
Removed if clause for building code in main codebase from the CI pipeline.
2020-08-28 12:17:38 +05:30
8983f9c11c Update README.md 2020-08-26 21:55:05 +03:00
9b464e0be1 Merge pull request #1507 from amit1307/upgrade-mockito-1486
Upgrade Mockito version
2020-08-26 21:20:11 +03:00
b07d33f332 Upgrade Mockito version to latest 2020-08-26 00:09:30 +01:00
6c4c6097be Merge branch 'master' of https://github.com/iluwatar/java-design-patterns 2020-08-25 23:21:25 +01:00
9dd46d7b4a Update README.md 2020-08-25 21:42:42 +03:00
723afb85ba Set version for next development iteration 2020-08-25 21:21:36 +03:00
a0e5d061cb Milestone 1.23.0 2020-08-25 21:20:30 +03:00
687648af0a Merge pull request #1506 from iluwatar/all-contributors/add-stefanbirkner
docs: add stefanbirkner as a contributor
2020-08-25 17:43:29 +03:00
96aa21d0e8 docs: update .all-contributorsrc [skip ci] 2020-08-25 14:42:54 +00:00
b8f83c326d docs: update README.md [skip ci] 2020-08-25 14:42:53 +00:00
15d795bf8a Merge pull request #1505 from stefanbirkner/system-lambda
Replace System Rules with System Lambda
2020-08-25 17:41:09 +03:00
3754c66604 Replace System Rules with System Lambda
System Lambda is more specific. It only wraps the part of the code that
produces the output.
2020-08-24 23:20:03 +02:00
6d83ceba28 Update README.md 2020-08-23 18:53:57 +03:00
015b418114 Update README.md 2020-08-23 18:03:29 +03:00
0cba307844 Fix readme filename 2020-08-23 17:06:37 +03:00
a66edc84a0 Merge pull request #1504 from iluwatar/all-contributors/add-mkrzywanski
docs: add mkrzywanski as a contributor
2020-08-23 17:00:32 +03:00
c18282ad5d docs: update .all-contributorsrc [skip ci] 2020-08-23 13:59:15 +00:00
7411ea86bf docs: update README.md [skip ci] 2020-08-23 13:59:14 +00:00
ef033b66a6 Merge pull request #1499 from mkrzywanski/pattern/filterer
Filterer pattern
2020-08-23 16:56:06 +03:00
e65b65257e fixing typos in readme file, introducing var local type inference where possible 2020-08-23 11:00:15 +02:00
3d9afbaeec fixed typo in read me 2020-08-22 18:24:41 +02:00
61a819aab8 Added fixes after review. Changed example pattern application to threat detection domain 2020-08-22 18:11:14 +02:00
61b95c294b Update github token 2020-08-22 14:49:56 +03:00
4068d1fead Update sonar badges 2020-08-22 14:03:21 +03:00
b284230ecf Merge pull request #1502 from iluwatar/all-contributors/add-edycutjong
docs: add edycutjong as a contributor
2020-08-21 18:01:31 +03:00
0529b77abb docs: update .all-contributorsrc [skip ci] 2020-08-21 15:00:49 +00:00
a2ae5d1324 docs: update README.md [skip ci] 2020-08-21 15:00:48 +00:00
25159ed9a8 Merge pull request #1501 from iluwatar/all-contributors/add-ToxicDreamz
docs: add ToxicDreamz as a contributor
2020-08-21 17:35:37 +03:00
7f09cd5b2d docs: update .all-contributorsrc [skip ci] 2020-08-21 14:34:24 +00:00
b388020fc0 docs: update README.md [skip ci] 2020-08-21 14:34:23 +00:00
0c552effc3 Merge pull request #1492 from ToxicDreamz/SonarCloud-Reports-Issue#1012
Fixed most reported issues by SonarCloud.
2020-08-21 17:25:16 +03:00
905b5dc6d8 Implemented filterer pattern 2020-08-21 11:51:43 +02:00
885c8a6765 Fixed a test-case issue within the dirty-flag module. 2020-08-20 01:21:03 +04:00
6b5b2ac1e8 Merge remote-tracking branch 'origin/SonarCloud-Reports-Issue#1012' into SonarCloud-Reports-Issue#1012 2020-08-20 01:03:50 +04:00
c35b98b4d7 Fixed pom.xml issues within the dirty-flag and partial-response modules that were causing build failures. 2020-08-20 01:01:03 +04:00
f5fddeb7f0 Merge branch 'master' into SonarCloud-Reports-Issue#1012 2020-08-19 23:29:36 +04:00
292ec5b8e5 Merge branch 'SonarCloud-Reports-Issue#1012'
# Conflicts:
#	pom.xml
2020-08-19 23:27:43 +04:00
60d87789a6 Merge pull request #1 from iluwatar/master
Fork Update
2020-08-19 23:26:19 +04:00
860453b46b Fixed JUnit tests causing build issues due to mixing JUnit 4 & JUnit 5 2020-08-19 23:14:37 +04:00
6921b0dce0 Fixed checkstyle errors causing build failures. 2020-08-19 13:27:08 +04:00
1e385056fc finish translate adapter pattern into chinese 2020-08-19 17:10:14 +08:00
847585334c Update README.md 2020-08-18 20:09:04 +03:00
9bb0b6fe6f Merge pull request #1498 from iluwatar/all-contributors/add-ohbus
docs: add ohbus as a contributor
2020-08-18 19:46:13 +03:00
31881f500d docs: update .all-contributorsrc [skip ci] 2020-08-18 16:45:38 +00:00
06f20570b6 docs: update README.md [skip ci] 2020-08-18 16:45:37 +00:00
017ee23793 Merge pull request #1497 from iluwatar/all-contributors/add-nahteb
docs: add nahteb as a contributor
2020-08-18 19:42:38 +03:00
6c7715ace6 docs: update .all-contributorsrc [skip ci] 2020-08-18 16:42:03 +00:00
ef43af3b23 docs: update README.md [skip ci] 2020-08-18 16:42:02 +00:00
95e513b6ec Edit readme 2020-08-17 19:49:00 +03:00
194040543e Merge pull request #1493 from ohbus/master
updated workflows
2020-08-17 19:18:39 +03:00
846a174ade Merge pull request #1496 from iluwatar/all-contributors/add-ohbus
docs: add ohbus as a contributor
2020-08-17 19:14:47 +03:00
7f60f7be25 docs: update .all-contributorsrc [skip ci] 2020-08-17 16:14:04 +00:00
cfb58191ea docs: update README.md [skip ci] 2020-08-17 16:14:03 +00:00
82bf9fdd61 Merge pull request #1494 from nahteb/fix-typo
Fix typo in README for Observer pattern
2020-08-17 19:13:25 +03:00
be552d0ece Merge pull request #1495 from iluwatar/all-contributors/add-xdvrx1
docs: add xdvrx1 as a contributor
2020-08-17 19:11:05 +03:00
d584404df6 docs: update .all-contributorsrc [skip ci] 2020-08-17 16:10:21 +00:00
353a2d9fcf docs: update README.md [skip ci] 2020-08-17 16:10:20 +00:00
8c5740563d reverted the copyright year back to 2019 2020-08-17 19:12:54 +05:30
89bda692f8 Fix typo in README
The log message in the Orcs class should say orcs instead of hobbits.

This is correct in the code example but wrong in the README.
2020-08-17 07:47:30 +01:00
241f93f3cc updated cache to v2 and removed SQ analysis 2020-08-17 11:28:33 +05:30
57e45a329f Fixed a whitespace and spelling issue that was causing the test case to fail. 2020-08-16 22:35:15 +04:00
79a6af703e updated copyright year to 2020 2020-08-16 12:49:21 +05:30
00d06871f4 updated workflows 2020-08-16 12:42:08 +05:30
133ef52898 Fixed an issue with the order of imports that was causing build failures. 2020-08-15 22:19:27 +04:00
7afb065a10 Upgrade urm plugin to latest version 2020-08-15 20:59:11 +03:00
af9f8fe4e1 Merge pull request #1491 from iluwatar/all-contributors/add-xdvrx1
docs: add xdvrx1 as a contributor
2020-08-15 20:54:25 +03:00
a1c96ede13 docs: update .all-contributorsrc [skip ci] 2020-08-15 17:53:38 +00:00
0d2c4abe5a docs: update README.md [skip ci] 2020-08-15 17:53:37 +00:00
31471acb69 Fixed most reported issues by SonarCloud. 2020-08-15 21:47:39 +04:00
e7e3ace01f Merge pull request #1489 from iluwatar/all-contributors/add-RayYH
docs: add RayYH as a contributor
2020-08-11 17:30:33 +03:00
41dacc2e2e docs: update .all-contributorsrc [skip ci] 2020-08-11 14:29:45 +00:00
dc7bf6190d docs: update README.md [skip ci] 2020-08-11 14:29:44 +00:00
98d2dc0104 Merge pull request #1487 from RayYH/master
fix word typo
2020-08-11 17:29:06 +03:00
870d44b127 Fix layout 2020-08-11 17:26:05 +03:00
834f20911b Merge pull request #1488 from iluwatar/all-contributors/add-ashishtrivedi16
docs: add ashishtrivedi16 as a contributor
2020-08-11 17:23:22 +03:00
2b7949ce6a docs: update .all-contributorsrc [skip ci] 2020-08-11 14:21:59 +00:00
4ffab7da85 docs: update README.md [skip ci] 2020-08-11 14:21:58 +00:00
1683fbdf9c Clean up Transaction Script 2020-08-11 17:17:25 +03:00
d091e369ec Merge pull request #1480 from ashishtrivedi16/master
#1321 Transaction script model implementation
2020-08-11 16:59:48 +03:00
b91bbc773d fix word typo 2020-08-11 14:19:39 +08:00
3c07a42e9d #1321 Updated UML diagram 2020-08-11 00:23:00 +05:30
e99bcf772b #1321 Added comments about TS 2020-08-11 00:21:46 +05:30
2d16e5afbf Merge branch 'master' of https://github.com/iluwatar/java-design-patterns 2020-08-10 16:27:28 +03:00
2c6f1832b0 Merge pull request #1485 from amit1307/logging-api-gateway-1338
Add logging in API Gateway
2020-08-10 16:26:18 +03:00
04a2be0c99 Update readme 2020-08-10 16:25:06 +03:00
10815b6469 Fix tags 2020-08-10 16:05:52 +03:00
75b10ed657 #1321 2020-08-10 13:21:24 +05:30
108532d8dd #1321 2020-08-10 13:12:12 +05:30
5527cf4234 #1321 Renamed main class 2020-08-10 13:06:46 +05:30
4008ae41b5 #1321 2020-08-10 13:02:35 +05:30
8166a1835d Merge remote-tracking branch 'origin/master' 2020-08-10 13:01:30 +05:30
4c9cad5475 #1321 Updated README 2020-08-10 13:01:12 +05:30
24126edd86 Update Hotel.java 2020-08-10 12:54:46 +05:30
c0edac0046 Rename TransactionScriptApp.java to App.java 2020-08-10 12:53:13 +05:30
f5c337981b Rename Readme.md to README.md 2020-08-10 12:52:37 +05:30
5441db6582 Update pom.xml 2020-08-10 12:52:15 +05:30
87f3a4d956 Delete module-info.java 2020-08-10 12:48:55 +05:30
31d753e59d Update transaction-script/Readme.md
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2020-08-10 00:25:43 +05:30
6cef98d41e Update transaction-script/Readme.md
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2020-08-10 00:25:01 +05:30
7450456dae Add syntax highlighting 2020-08-09 21:54:54 +03:00
45e416928d Update transaction-script/Readme.md
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2020-08-10 00:24:44 +05:30
94c131f7e9 Update transaction-script/Readme.md
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2020-08-10 00:24:33 +05:30
5eb9b98e78 Update transaction-script/Readme.md
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2020-08-10 00:24:20 +05:30
8305e9365d Fix typos 2020-08-09 21:49:00 +03:00
04e3368a81 Merge pull request #1482 from vINCENT8888801/private-class-data-explanation
Private class data explanation
2020-08-09 21:27:34 +03:00
d219a104c7 Add logging in API Gateway 2020-08-09 18:13:24 +01:00
700f5c6d27 corrected some typo 2020-08-09 18:22:40 +08:00
f4fa73cd48 Update README.md
Increase clarity
2020-08-09 16:28:40 +08:00
e09de2fb36 #1321 2020-08-09 01:58:19 +05:30
a59c9bba97 #1321 2020-08-09 01:39:51 +05:30
7acc5fbf95 #1321
Resolved conflicts and used var wherever possible
2020-08-09 01:33:19 +05:30
bdf2145b3f Merge branch 'master' into master 2020-08-09 01:17:07 +05:30
1e90d0d645 Merge pull request #1484 from iluwatar/all-contributors/add-vINCENT8888801
docs: add vINCENT8888801 as a contributor
2020-08-08 22:44:51 +03:00
b8c0985b97 docs: update .all-contributorsrc [skip ci] 2020-08-08 19:44:04 +00:00
c40d6ae9d7 docs: update README.md [skip ci] 2020-08-08 19:44:03 +00:00
76bfc68cd6 Merge pull request #1481 from vINCENT8888801/some-minor-spelling-error
Some minor spelling error in comment
2020-08-08 22:43:05 +03:00
d0ed10a619 Merge pull request #1479 from anuragagarwal561994/java-11
Java 11 remaining pattern
2020-08-08 22:32:43 +03:00
5bfaeffecf Update transaction-script/Readme.md
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2020-08-09 00:51:44 +05:30
c0acaf073b Update transaction-script/Readme.md
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2020-08-09 00:51:36 +05:30
9f190c59c4 Update transaction-script/Readme.md
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2020-08-09 00:51:28 +05:30
50ed5ca699 Some minor spelling error in comment 2020-08-09 03:15:26 +08:00
08cec0e254 Update README.md 2020-08-09 03:10:43 +08:00
1f6e6f34ea Update README.md 2020-08-09 03:09:53 +08:00
134ccdb5a1 Corrects condition 2020-08-08 11:56:34 +00:00
fa68789cd5 #1321 Updated readme and add UML diagram 2020-08-08 15:49:14 +05:30
8b92bc6bb6 Corrects README.md 2020-08-08 00:53:30 +00:00
8e060ad0ad Refactors null object pattern to java-11 2020-08-08 00:46:08 +00:00
a5038c4329 Uses java-11 in naked objects 2020-08-08 00:41:58 +00:00
b0ac4c1ca3 #590 explanation for Arrange/Act/Assert 2020-08-07 19:10:50 +03:00
0ead283f55 Merge pull request #1475 from ravening/simplify_observer
Use enums instead os switch blocks
2020-08-05 17:59:52 +03:00
888af23219 Merge pull request #1220 from anuragagarwal561994/java-11
Java 11 (patterns with m)
2020-08-05 17:38:54 +03:00
0c83ccc2fe Use enums instead os switch blocks
Its better to use enums instead of switch
blocks which makes the code longer and difficult
to maintain as and when new state appears.
2020-08-05 15:50:05 +02:00
a7095602d6 Refactors using var 2020-08-04 21:46:30 +00:00
4b38746ce9 Removes usage of Dictionary 2020-08-04 21:41:25 +00:00
cd20e7a3f4 Minor readme fixes 2020-08-04 21:45:16 +03:00
7f29c2455f #590 explanation for Ambassador 2020-08-04 21:36:08 +03:00
51e8900d31 Merge pull request #1474 from iluwatar/all-contributors/add-ravening
docs: add ravening as a contributor
2020-08-04 17:48:52 +03:00
20a5dde8a4 docs: update .all-contributorsrc [skip ci] 2020-08-04 14:48:06 +00:00
bf4706addf docs: update README.md [skip ci] 2020-08-04 14:48:05 +00:00
97285d3724 Merge pull request #1472 from ravening/command
#1324 Use interfaces in command pattern
2020-08-04 17:47:32 +03:00
f234baf258 Cleanup code 2020-08-04 16:34:41 +02:00
ca58fa3f21 #590 add related patterns to Abstract Factory 2020-08-04 17:31:33 +03:00
ca7192889d Fixes test cases for master-worker-pattern 2020-08-03 18:50:45 +00:00
fa3b93bf8d #590 fix diagram 2020-08-03 21:25:13 +03:00
a7b4194a71 #590 explanation for Aggregator Microservices 2020-08-03 21:09:31 +03:00
054b1eaac6 Resolves test failures 2020-08-03 15:59:28 +00:00
44a654a2e3 Resolves CR comments 2020-08-03 15:45:29 +00:00
10988526a2 Merge branch 'master' of github.com:iluwatar/java-design-patterns into java-11 2020-08-03 15:42:18 +00:00
b9f17824fa removing unwanted modifiers 2020-08-03 17:38:03 +02:00
3ae7466647 Typically command pattern is implemented using
interfaces and concrete classes. Refactor the
code to use the same
2020-08-03 16:51:30 +02:00
9ff5b9e7c0 Fix merge 2020-08-03 16:49:46 +03:00
4941e8ebc4 Merge pull request #1471 from iluwatar/all-contributors/add-charlesfinley
docs: add charlesfinley as a contributor
2020-08-03 16:35:28 +03:00
081d789749 Merge branch 'master' into all-contributors/add-charlesfinley 2020-08-03 16:34:41 +03:00
f84f7b973c docs: update .all-contributorsrc [skip ci] 2020-08-03 13:30:52 +00:00
83acaa82d4 docs: update README.md [skip ci] 2020-08-03 13:30:51 +00:00
b0ded54c66 Cleanup 2020-08-02 22:48:54 +03:00
689cc8b59b Update surefire and minor improvements 2020-08-02 11:55:13 +03:00
8c7dd72d5a Merge pull request #1470 from charlesfinley/master
Updated ${artifactId} to ${project.artifactId}
2020-08-02 11:51:14 +03:00
14487261d0 Use of ${artifactId} is deprecated and should be updated to ${project.artifactId} 2020-08-02 00:03:36 -04:00
a9b7111b39 work on Abstract Factory readme 2020-08-01 16:26:14 +03:00
b3bfd43bff #590 update Acyclic Visitor class diagram 2020-08-01 15:54:46 +03:00
6a8297598e #1047 remove module infos 2020-08-01 15:19:09 +03:00
7ac8eba434 #590 explanation for Acyclic Visitor 2020-08-01 15:18:32 +03:00
595086aa13 Merge pull request #1467 from iluwatar/all-contributors/add-raja-peeyush-kumar-singh
docs: add raja-peeyush-kumar-singh as a contributor
2020-08-01 12:49:06 +03:00
38791a6a66 docs: update .all-contributorsrc [skip ci] 2020-08-01 09:48:24 +00:00
27c40826de docs: update README.md [skip ci] 2020-08-01 09:48:23 +00:00
d1d67bcb6c Merge pull request #1466 from iluwatar/all-contributors/add-nishant
docs: add nishant as a contributor
2020-08-01 11:46:28 +03:00
d41077f355 docs: update .all-contributorsrc [skip ci] 2020-08-01 08:45:39 +00:00
e4473e5c88 docs: update README.md [skip ci] 2020-08-01 08:45:38 +00:00
7af544998d Merge pull request #1465 from iluwatar/all-contributors/add-MananS77
docs: add MananS77 as a contributor
2020-08-01 11:08:05 +03:00
0a2c87d49a docs: update .all-contributorsrc [skip ci] 2020-08-01 08:07:21 +00:00
15eb49e574 docs: update README.md [skip ci] 2020-08-01 08:07:20 +00:00
661f9e1373 Merge pull request #1464 from iluwatar/all-contributors/add-charlesfinley
docs: add charlesfinley as a contributor
2020-08-01 10:42:44 +03:00
7908d38604 docs: update .all-contributorsrc [skip ci] 2020-08-01 07:41:48 +00:00
41020982de docs: update README.md [skip ci] 2020-08-01 07:41:47 +00:00
43569ecd66 Merge pull request #1463 from charlesfinley/master
Fixes Issue #1462 - Unit Test assertEquals parameters are reversed
2020-08-01 10:39:20 +03:00
fb6507ceda Corrected assertEquals order for expected, actual. 2020-07-31 22:52:23 -04:00
29f799c815 Corrected assertEquals order for expected, actual. 2020-07-31 22:50:48 -04:00
55bb1f11e0 #590 fix typo 2020-07-30 21:57:07 +03:00
8364b289b4 #590 explanation for Abstract Document 2020-07-30 21:39:11 +03:00
417f21ed3d Code cleanup (#1461)
* Code cleanup

* Fix flux tests

* Fix checkstyle errors

* Fix compile error
2020-07-30 20:28:47 +03:00
5381387026 docs: add xiaod-dev as a contributor (#1460)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 21:03:29 +03:00
f95aadc8f5 docs: add hbothra15 as a contributor (#1459)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

* fix merge

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 20:42:45 +03:00
402b753480 docs: add webpro as a contributor (#1458)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 20:24:01 +03:00
6a28d09a3c docs: add zd-zero as a contributor (#1457)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 20:22:29 +03:00
1e38edec15 docs: add rachelcarmena as a contributor (#1456)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 20:21:07 +03:00
ec7a2025f0 docs: add iamrichardjones as a contributor (#1455)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 20:19:47 +03:00
de79019ece docs: add Jahhein as a contributor (#1454)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 20:18:15 +03:00
f2ac53edca docs: add Bobo1239 as a contributor (#1453)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 20:16:54 +03:00
c9e30390d3 docs: add vertti as a contributor (#1452)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 20:14:42 +03:00
f49f9a15b6 docs: add d4gg4d as a contributor (#1451)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 20:13:24 +03:00
f878bf63aa docs: add sivasubramanim as a contributor (#1450)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 20:11:51 +03:00
51ef7176b1 docs: add grzesiekkedzior as a contributor (#1449)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 20:08:47 +03:00
46d4155328 docs: update .all-contributorsrc [skip ci] 2020-07-29 17:08:13 +00:00
a968dce586 docs: update README.md [skip ci] 2020-07-29 17:08:12 +00:00
047285aed7 docs: add PalAditya as a contributor (#1448)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 20:07:30 +03:00
4db3a1cfb2 docs: add varunu28 as a contributor (#1447)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 20:06:01 +03:00
075fbe7433 docs: add yorlov as a contributor (#1446)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 20:04:33 +03:00
1f0a24cefa docs: add trautonen as a contributor (#1445)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 19:59:40 +03:00
69341ff712 docs: add IAmPramod as a contributor (#1443)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:53:14 +03:00
a1b2ab129e docs: add Amarnath510 as a contributor (#1442)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:51:03 +03:00
87c2644842 docs: add Anurag870 as a contributor (#1441)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:49:20 +03:00
1d025b7019 docs: add Deathnerd as a contributor (#1440)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:47:29 +03:00
34a36cb519 docs: add Harshrajsinh as a contributor (#1439)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:45:07 +03:00
62ac59afda docs: add MaVdbussche as a contributor (#1438)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:43:26 +03:00
beffc87deb docs: add alexsomai as a contributor (#1437)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:41:47 +03:00
706c5092c1 docs: add amogozov as a contributor (#1436)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:40:00 +03:00
e222a69964 docs: add anthonycampbell as a contributor (#1435)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:38:23 +03:00
9483888b5e docs: add christophercolumbusdog as a contributor (#1434)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:36:36 +03:00
73d55afd58 docs: add dzmitryh as a contributor (#1433)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:34:58 +03:00
1f900d164d docs: add jjjimenez100 as a contributor (#1432)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:33:18 +03:00
5d21a03acd docs: add kaiwinter as a contributor (#1431)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:31:35 +03:00
6c9b912620 docs: add lbroman as a contributor (#1430)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:29:55 +03:00
7fdcd2ec5a docs: add pnowy as a contributor (#1429)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:28:18 +03:00
dafe495610 docs: add prafful1 as a contributor (#1428)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:26:38 +03:00
6f0035e7c2 docs: add sankypanhale as a contributor (#1427)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:25:03 +03:00
652a68b134 docs: add staillebois as a contributor (#1426)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:23:12 +03:00
b5fac5cf86 docs: add valdar-hu as a contributor (#1425)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:21:22 +03:00
ecb7b44f97 docs: add vanogrid as a contributor (#1424)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:19:24 +03:00
1841fba831 docs: add yosfik as a contributor (#1423)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:17:45 +03:00
325f0d93b2 docs: add 7agustibm as a contributor (#1422)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:16:02 +03:00
efd8c8156e docs: add Juaanma as a contributor (#1421)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:14:26 +03:00
ae57ec75f3 docs: add LuigiCortese as a contributor (#1420)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:12:46 +03:00
47acedaaf7 docs: add Rzeposlaw as a contributor (#1419)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 19:10:44 +03:00
65d627b2ed docs: add akrystian as a contributor (#1418)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:49:46 +03:00
b4e4cf9cfe docs: add baislsl as a contributor (#1417)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:48:09 +03:00
b67a019c48 docs: add besok as a contributor (#1416)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:45:53 +03:00
1bbae5fd5a docs: add dmitraver as a contributor (#1415)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:44:29 +03:00
d11b2f06ea docs: add fanofxiaofeng as a contributor (#1414)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:42:55 +03:00
2a66fec6fe docs: add hoangnam2261 as a contributor (#1413)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:41:17 +03:00
a475df845b docs: add jarpit96 as a contributor (#1412)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:38:07 +03:00
1bc77a80f2 docs: add joningiwork as a contributor (#1411)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:36:27 +03:00
9b5ae765fc docs: add kirill-vlasov as a contributor (#1410)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:34:45 +03:00
8e268cf261 docs: add mitchellirvin as a contributor (#1409)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:32:59 +03:00
fe2f8f74a1 docs: add ranjeet-floyd as a contributor (#1408)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:29:41 +03:00
e2a42b0051 docs: add Alwayswithme as a contributor (#1407)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:28:10 +03:00
54bb02f691 docs: add MSaifAsif as a contributor (#1406)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:26:34 +03:00
a70213f852 docs: add kanwarpreet25 as a contributor (#1405)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:25:03 +03:00
19929d9e72 docs: add leonmak as a contributor (#1404)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:23:23 +03:00
09880e3850 docs: add perwramdemark as a contributor (#1403)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:21:41 +03:00
96bfb8bd9f docs: add waisuan as a contributor (#1402)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:19:53 +03:00
a727a1d05b docs: add AnaghaSasikumar as a contributor (#1401)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:18:07 +03:00
46fdc5a54f docs: add christofferh as a contributor (#1400)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:16:12 +03:00
8137609e2f docs: add dgruntz as a contributor (#1399)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:14:30 +03:00
e924c9399a docs: add hannespernpeintner as a contributor (#1398)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:12:47 +03:00
d791c78501 docs: add leogtzr as a contributor (#1397)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:11:09 +03:00
ba485e2c3e docs: add npczwh as a contributor (#1396)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:09:00 +03:00
be54dc1c7e docs: add oconnelc as a contributor (#1395)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:07:15 +03:00
ec80402fe5 docs: add giorgosmav21 as a contributor (#1394)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:05:22 +03:00
d1de465780 docs: add hbothra15 as a contributor (#1393)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:02:13 +03:00
c2fb591749 docs: add igeligel as a contributor (#1392)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 18:00:07 +03:00
c5479cc882 docs: add llorllale as a contributor (#1391)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 17:58:00 +03:00
7968615ad4 docs: add mookkiah as a contributor (#1390)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 17:55:53 +03:00
c0d7c8922e docs: add Azureyjt as a contributor (#1388)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 17:53:30 +03:00
5a23fab795 docs: add vehpsr as a contributor (#1389)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 17:50:53 +03:00
8c21809dad docs: add ThatGuyWithTheHat as a contributor (#1387)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 17:49:00 +03:00
37bffb4a99 docs: add gopinath-langote as a contributor (#1386)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 17:47:06 +03:00
8182405796 docs: add hoswey as a contributor (#1385)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 17:44:05 +03:00
39e5436ed5 docs: add amit2103 as a contributor (#1384)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 17:41:35 +03:00
8d6791490b docs: add gwildor28 as a contributor (#1383)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 17:39:11 +03:00
eb8ddde98f docs: add llitfkitfk as a contributor (#1382)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-29 17:36:32 +03:00
0358fcec4c update readme 2020-07-28 20:53:31 +03:00
023865ad4c docs: add pitsios-s as a contributor (#1381)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-28 20:45:59 +03:00
60ab9fa3ce docs: add qza as a contributor (#1380)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-28 20:43:09 +03:00
f85e4db0be docs: add Tschis as a contributor (#1379)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-28 20:40:11 +03:00
2b095bec28 docs: add ankurkaushal as a contributor (#1378)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-28 20:37:11 +03:00
cfba28f9a4 docs: add okinskas as a contributor (#1377)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <ilkka.seppala@gofore.com>
2020-07-28 20:33:05 +03:00
c0d2c7fdb0 docs: add robertt240 as a contributor (#1376)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 20:23:30 +03:00
96344142e9 docs: add sideris as a contributor (#1375)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 18:52:31 +03:00
0bc3756250 update all-contributors config 2020-07-28 18:49:46 +03:00
d94199f5ff update readme 2020-07-28 18:23:47 +03:00
b805a7526e docs: add SrdjanPaunovic as a contributor (#1374)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 18:17:42 +03:00
0cff538c27 docs: add gvsharma as a contributor (#1373)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 18:16:14 +03:00
452981669b docs: add kapinuss as a contributor (#1372)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 18:14:37 +03:00
2706c8fc37 docs: add qpi as a contributor (#1371)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 18:13:03 +03:00
03ebd5f353 docs: add yusufaytas as a contributor (#1370)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 18:11:29 +03:00
5b269d5af1 docs: add 4lexis as a contributor (#1369)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 18:09:43 +03:00
0563ac7645 docs: add bernardosulzbach as a contributor (#1368)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 18:08:01 +03:00
a5ff32c13e docs: add dheeraj-mummareddy as a contributor (#1367)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 18:02:49 +03:00
97adc13a1b docs: add JuhoKang as a contributor (#1366)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:57:26 +03:00
d8f12529f2 docs: add ruslanpa as a contributor (#1365)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:55:47 +03:00
4c766b9e71 docs: add colinbut as a contributor (#1364)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:52:39 +03:00
c85d764e39 docs: add nikhilbarar as a contributor (#1363)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:50:39 +03:00
f360b64877 docs: add saksham93 as a contributor (#1362)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:48:50 +03:00
a77e9620b5 docs: add TylerMcConville as a contributor (#1361)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:46:41 +03:00
cf8e366e25 docs: add Argyro-Sioziou as a contributor (#1360)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:44:46 +03:00
80605283f5 docs: add kemitix as a contributor (#1359)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:42:27 +03:00
8ba111fe60 docs: add zafarella as a contributor (#1358)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:40:28 +03:00
1cb9c2bcde docs: add Crossy147 as a contributor (#1357)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:37:56 +03:00
d6edeee326 docs: add joshzambales as a contributor (#1356)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:35:49 +03:00
781a7c8b52 docs: add piyushchaudhari04 as a contributor (#1355)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:32:58 +03:00
960adfc37a docs: add inbravo as a contributor (#1354)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:30:42 +03:00
b3eb6ccea4 docs: add isabiq as a contributor (#1353)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:28:35 +03:00
d609f3eec6 docs: add markusmo3 as a contributor (#1352)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-28 17:26:03 +03:00
09dd0bee30 docs: add anuragagarwal561994 as a contributor (#1351)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-27 23:20:44 +03:00
64eff5eb93 docs: add thomasoss as a contributor (#1350)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-27 23:18:02 +03:00
05dfd31fb7 docs: add mikulucky as a contributor (#1349)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-27 23:14:34 +03:00
2c8535e839 max 3 contribution types per person 2020-07-27 23:07:58 +03:00
aea90ab115 docs: add fluxw42 as a contributor (#1348)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-27 22:48:15 +03:00
211d7903ae docs: add npathai as a contributor (#1347)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-27 22:40:20 +03:00
02b6aba6ae fix config syntax 2020-07-27 22:38:07 +03:00
76f634ff7a docs: add iluwatar as a contributor (#1346)
* docs: update README.md [skip ci]

* docs: create .all-contributorsrc [skip ci]

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2020-07-27 21:50:31 +03:00
ae7a0b8a4a docs: add amit1307 as a contributor (#1345)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-27 21:17:52 +03:00
b7d122f614 docs: add iluwatar as a contributor (#1344)
* docs: update README.md [skip ci]

* docs: create .all-contributorsrc [skip ci]

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2020-07-27 21:13:13 +03:00
93c11fdf23 Update README.md 2020-07-27 21:01:48 +03:00
ef4de30310 docs: add iluwatar as a contributor (#1343)
* docs: update README.md [skip ci]

* docs: create .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-27 20:59:08 +03:00
b62bed7e43 #590 explanation for Promise 2020-07-27 18:28:12 +03:00
54c0b1725c Fix broken logging in service layer (#1342) 2020-07-27 16:50:32 +03:00
9b25d302b7 Fix broken logging in service layer 2020-07-26 21:57:15 +01:00
4b88214bae Fix syntax 2020-07-26 22:47:33 +03:00
eee409f284 Fix syntax 2020-07-26 22:44:54 +03:00
2fdd7a11e9 SonarQube check runs only in master branch (workaround for https://jira.sonarsource.com/browse/MMF-1371) 2020-07-26 22:40:42 +03:00
12d392931e #1321 Added UML diagram 2020-07-27 00:39:53 +05:30
f37d697a60 #590 explanation for Service Layer 2020-07-26 19:25:25 +03:00
4017c37b6f #1321 Fixed a test 2020-07-26 18:34:42 +05:30
3e1a83e29d #590 explanation for API Gateway 2020-07-26 15:53:48 +03:00
9d191324ff #1321 2020-07-26 18:17:00 +05:30
75ab3b5245 #1321 Added Tests 2020-07-26 17:38:33 +05:30
e0fb2d014a #1321 Added comments and refactored code 2020-07-26 15:56:55 +05:30
0a35cdfbe4 #590 explanation for Unit of Work 2020-07-26 12:10:48 +03:00
1eafb46b61 Update links and tags 2020-07-26 11:30:42 +03:00
2ee5789c77 #590 explanation for Trampoline 2020-07-25 15:48:21 +03:00
d9ed8a52b5 Update readme 2020-07-25 14:28:43 +03:00
205b87cd93 Improve Prototype description 2020-07-24 16:45:28 +03:00
689486267d #590 add explanation to Pipeline 2020-07-23 18:53:47 +03:00
9deb587c52 #590 add explanation for Fluent Interface 2020-07-23 18:27:00 +03:00
645fb20730 #590 improve Retry explanation 2020-07-23 17:50:20 +03:00
1886a6f969 #590 add explanation for Game Loop 2020-07-22 21:34:44 +03:00
9db997d0ae #590 add explanation for Thread Pool 2020-07-22 20:59:14 +03:00
8982392fea #590 add explanation for Throttling 2020-07-22 20:31:56 +03:00
082d63a1b3 #590 add explanation for Tolerant Reader 2020-07-21 22:57:11 +03:00
6c21143303 #590 add explanation for Dependency Injection 2020-07-21 20:04:06 +03:00
172964e75c #590 explanation for Template Method 2020-07-20 20:23:39 +03:00
ab4e53a468 #590 add explanation for State 2020-07-20 20:06:39 +03:00
b907a2a9bc #590 add explanation for Memento 2020-07-20 17:52:44 +03:00
467f647ca2 #590 add explanation for Repository 2020-07-20 17:31:58 +03:00
a18c0f76ea #590 add explanation for Poison Pill 2020-07-19 20:23:12 +03:00
e34de39ae7 #590 explanation for Null Object 2020-07-19 19:53:31 +03:00
c4b1b89f1f #1321 2020-07-19 22:20:15 +05:30
4d95d38b8d #590 explanation for Multiton 2020-07-19 19:37:40 +03:00
52e6ea2b68 #1321
Implemented DAO
2020-07-19 20:33:52 +05:30
d2724e8091 #590 add explanation for Strategy 2020-07-19 17:34:58 +03:00
9a81ddb7d8 #590 add explanation for Observer 2020-07-19 17:14:02 +03:00
112973482d #1321
Added basic structure and planned out the roadmap
2020-07-19 16:51:16 +05:30
58e3fbfc6a #1321
Added gitignore
2020-07-19 16:19:01 +05:30
bf01f3e68b #1321
Added Readme file
2020-07-19 15:35:53 +05:30
58b98c54e5 #1321
Initial folder setup
2020-07-19 15:30:30 +05:30
61dfa50822 #590 add explanation for Execute Around 2020-07-18 17:43:12 +03:00
09cee8ffa7 #590 add explanation for DTO 2020-07-18 17:10:50 +03:00
5aacdecc6c #590 add explanation for Callback 2020-07-18 11:25:49 +03:00
eeea3c7b1f #590 add explanation for Object Pool 2020-07-18 10:51:02 +03:00
76fb9aff8b #590 add explanation for Dao 2020-07-18 10:22:43 +03:00
68fa6f451b #590 add explanation for Visitor 2020-07-16 20:46:00 +03:00
e98ad671e9 #590 add explanation for Iterator pattern 2020-07-15 20:06:58 +03:00
4264f52d49 #590 add explanation for Command pattern 2020-07-15 11:03:23 +03:00
ee654cf7b2 Add references to Enterprise Integration Patterns 2020-07-07 21:23:04 +03:00
51f6282e9b Add references to Patterns of Enterprise Application Architecture 2020-07-07 21:19:14 +03:00
2212690468 Add references to J2EE Design Patterns book 2020-07-07 20:05:35 +03:00
4beb53b8b8 Add references to Refactoring to Patterns book 2020-07-07 18:44:00 +03:00
0b1a98137a Add links to Head First Design Patterns book 2020-07-07 18:05:11 +03:00
bd1dbec19f Translate README.md via GitLocalize (#1259)
Co-authored-by: xiaod-dev <657829312@qq.com>
2020-07-07 21:17:11 +08:00
a3564a8847 Update links 2020-07-06 13:31:07 +03:00
9e30383eb6 Update license and puml 2020-07-04 12:20:54 +03:00
6fe219d644 Pr/1235 Review (#1250)
* Add simple implementation for strangler pattern.

* Add strangler pattern in pom.xml.

* change package name

* Revert "change package name"

This reverts commit 430bd9073e.

* Code review for strangler

Delete final of method parameters.
Add final to private members.
Change package name.

* Revert "Code review for strangler"

This reverts commit d506356708.

* Revert "Revert "Code review for strangler""

This reverts commit c8fd65fda7.

* Remove unnecessary files
2020-07-04 12:05:46 +03:00
5192beb5dd Re-add gh access token 2020-06-14 22:36:47 +03:00
f4f9c1a441 Remove gh token 2020-06-14 22:15:13 +03:00
a396d972f6 Add sonar modulekey 2020-06-14 21:54:47 +03:00
30678792fd Remove extra project key 2020-06-14 21:23:07 +03:00
cfa2b35bff Fix syntax 2020-06-14 21:04:09 +03:00
5db8037b8b Add SonarCloud analysis 2020-06-14 21:02:40 +03:00
71affacee2 Remove update website script 2020-06-14 20:19:35 +03:00
371263d1b3 Fix xvfb setup 2020-06-14 18:45:01 +03:00
0b41aaaa76 Fix syntax 2020-06-14 18:37:29 +03:00
f28a63a46c Use GabrielBB/xvfb-action 2020-06-14 18:33:48 +03:00
3ea65e06bc Install xvfb before building 2020-06-14 18:23:25 +03:00
1aea35f8e5 Update build status badge 2020-06-14 17:48:42 +03:00
0f751d40cb Fix checkstyle error 2020-06-14 17:36:26 +03:00
92ecd63ccf Add Github Actions workflow 2020-06-14 17:27:43 +03:00
3033e4c9fc Improve lazy loaded Singleton example 2020-06-10 18:10:34 +03:00
e68beb40ec Fix typo for leader-election pattern description (#1239) 2020-05-31 10:47:14 +03:00
a3c4d36c3d Added Java 11 support and created constants in App.java (#1238)
Co-authored-by: cherukumilliv <VenkatRamaSubbarago.Cherukumilli@Cevalogistics.com>
2020-05-31 10:45:28 +03:00
1c26bd7416 Fix issue #1218: Arrange, Act, Assert pattern (#1221)
* add AAA pattern

* reformat comment

* use Testing in readme tags in stead of Unit Test
2020-05-17 21:44:53 +03:00
daf53225d8 Resolves CR comments 2020-05-01 08:04:45 +00:00
845da1fa16 add java 11 support (o) (#1222) 2020-04-26 15:06:09 +03:00
d733122e7a Java 11 migraiton: mutex 2020-04-12 23:00:49 +00:00
2fa938c02d Java 11 migraiton: mute-idiom 2020-04-12 22:58:50 +00:00
9b105d770d Java 11 migraiton: multiton 2020-04-12 22:51:37 +00:00
109d33c710 Java 11 migraiton: monostate 2020-04-12 22:49:00 +00:00
a142c06048 Java 11 migraiton: monad 2020-04-12 22:45:54 +00:00
f1b27ef5c7 Java 11 migraiton: module 2020-04-12 22:38:00 +00:00
99c70af16a Java 11 migraiton: model-view-presenter 2020-04-12 22:35:33 +00:00
edcb520d08 Java 11 migraiton: model-view-controller 2020-04-12 22:30:18 +00:00
a00622c656 Java 11 migraiton: memento 2020-04-12 22:21:48 +00:00
93e5570778 Java 11 migraiton: mediator pattern 2020-04-12 22:19:11 +00:00
59e050b20b Java 11 migraiton: master-worker-pattern 2020-04-12 22:05:13 +00:00
e6c74a5fb9 Java 11 migraiton: marker 2020-04-12 21:35:48 +00:00
751b3b9452 Changing Aggregator Microservices pattern link (#1214)
Page doesn't exist anymore, so changed to use web archive
2020-03-28 20:26:37 +02:00
be1c0b8143 Fix issue #179: Leader Followers Pattern (#1189)
* add leader followers pattern

* use var and streams instead in App::execute

* use logger instead of printing to system output stream
2020-03-26 21:14:44 +02:00
6ce33ed6df Arranged following design patterns into modules: (#1210)
1. Factory Method
2. Feature Toggle
2020-03-26 21:04:11 +02:00
a4be693de6 Arranged design patterns into modules: (#1209)
1. Facade
2. Factory Kit
2020-03-26 21:03:10 +02:00
80519379f1 Organisation of design patterns into modules (#1208)
1. Event Asynchoronous
2. Execute Around
2020-03-25 21:27:41 +02:00
95bef5f0e8 Bump slf4j-test from 1.0.0 to 1.2.0 (#1204)
Bumps slf4j-test from 1.0.0 to 1.2.0.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-25 21:03:42 +02:00
d429865c54 Bump mockito-all from 1.9.5 to 1.10.19 (#1202)
Bumps [mockito-all](https://github.com/mockito/mockito) from 1.9.5 to 1.10.19.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v1.9.5...v1.10.19)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-25 21:00:51 +02:00
37a34ae174 Remove lombok dependency 2020-03-25 20:51:23 +02:00
67edeb806d Java 11 support for #984 #987 (l) (#1190)
* Java 11 support: lazy-loading pattern

* Java 11 support: layers pattern

* Java 11 support: leader-election/lazy-loading patterns
2020-03-22 20:02:45 +02:00
0ad67c8726 Use HTTPS instead of HTTP to resolve dependencies (#1184)
This fixes a security vulnerability in this project where the `pom.xml`
files were configuring Maven to resolve dependencies over HTTP instead of
HTTPS.

Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com>
2020-03-12 20:37:36 +02:00
a410004a8f Organisation of design patterns into modules: (#1188)
1. EIP Publish Channel
2. Event Aggregator
2020-03-07 11:53:19 +00:00
16ef70bfdc Organisation of patterns into modules: (#1187)
1. Double DIspatch
2. EIP Message Channel
2020-03-07 11:50:51 +00:00
6bf3a13064 Import of design patterns into modules: (#1186)
1. DIrty flag
2. Double checked locking
2020-03-07 11:48:25 +00:00
54db4497a3 Organised the below patterns into modules: (#1185)
1. Decorator
2. Delegation
2020-03-07 11:47:24 +00:00
eaf3598807 Organised below design patterns into modules: (#1183)
1. Data Mapper
2. Data Transfer Object
2020-03-07 11:24:31 +00:00
4e01ca39fd Organised below design patterns into modules: (#1182)
1. Converter
2. Dao
2020-03-07 11:22:55 +00:00
1c558ff4c5 Organised below design patterns into modules: (#1181)
1. Command
2. Composite
2020-03-07 11:20:44 +00:00
33e4a870ca Fix imperative-style. (#1180)
Signed-off-by: yichen88 <tang.yichenyves@gmail.com>
2020-03-07 11:12:06 +00:00
33682ad3e8 Modularisation for design patterns: (#1179)
1. Chain
2. Collection-Pipeline
2020-02-16 21:02:40 +02:00
2d6c372f21 Modularisation for 2 patterns: (#1178)
1. Business-delegate
2, Callback
2020-02-08 10:36:51 +02:00
f2bb46f9b4 Modularization for 2 more modules (#1177)
1. Abstract Factory
2. Acyclic Visitor
2020-02-05 07:14:27 +02:00
81cc85a9cd Bump mongodb-driver from 3.12.0 to 3.12.1 (#1173)
Bumps [mongodb-driver](https://github.com/mongodb/mongo-java-driver) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/mongodb/mongo-java-driver/releases)
- [Commits](https://github.com/mongodb/mongo-java-driver/compare/r3.12.0...r3.12.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-01 08:55:06 +02:00
f942bfa51c Bump javassist from 3.25.0-GA to 3.26.0-GA (#1170)
Bumps [javassist](https://github.com/jboss-javassist/javassist) from 3.25.0-GA to 3.26.0-GA.
- [Release notes](https://github.com/jboss-javassist/javassist/releases)
- [Commits](https://github.com/jboss-javassist/javassist/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-01 08:52:38 +02:00
d2fdd7d82b Bump mongo-java-driver from 3.12.0 to 3.12.1 (#1169)
Bumps [mongo-java-driver](https://github.com/mongodb/mongo-java-driver) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/mongodb/mongo-java-driver/releases)
- [Commits](https://github.com/mongodb/mongo-java-driver/compare/r3.12.0...r3.12.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-01 08:51:21 +02:00
365c74ddde Bump slf4j-api from 1.7.28 to 1.7.30 (#1153)
Bumps [slf4j-api](https://github.com/qos-ch/slf4j) from 1.7.28 to 1.7.30.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.28...v_1.7.30)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-20 17:13:50 +02:00
728de1bb34 Bump gson from 2.8.1 to 2.8.6 (#1147)
Bumps [gson](https://github.com/google/gson) from 2.8.1 to 2.8.6.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.8.1...gson-parent-2.8.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-18 21:02:56 +02:00
428efc7d53 Java 11 migrate remaining p (#1122)
* Moves partial-response to Java 11

* Moves pipeline to Java 11

* Moves poison-pill to Java 11

* Moves priority-queue to Java 11

* Moves private-class-data to Java 11

* Moves producer-consumer to Java 11

* Moves promise to Java 11

* Moves property to Java 11

* Moves prototype to Java 11

* Moves proxy to Java 11

* Corrects checkstyle errors

* Fixes build for pipeline pattern
2020-01-16 08:06:36 +02:00
1401accb4f Revert "Bump maven-surefire-plugin from 3.0.0-M3 to 3.0.0-M4 (#1126)"
This reverts commit f00523f7c0.
2020-01-12 11:00:23 +02:00
6dba5b9b58 Bump mongodb-driver from 3.0.4 to 3.12.0 (#1135)
Bumps [mongodb-driver](https://github.com/mongodb/mongo-java-driver) from 3.0.4 to 3.12.0.
- [Release notes](https://github.com/mongodb/mongo-java-driver/releases)
- [Commits](https://github.com/mongodb/mongo-java-driver/compare/r3.0.4...r3.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-11 10:09:56 +02:00
1ffb28ba4f [Security] Bump jackson.version from 2.8.5 to 2.10.2 (#1133)
Bumps `jackson.version` from 2.8.5 to 2.10.2.

Updates `jackson-core` from 2.8.5 to 2.10.2
- [Release notes](https://github.com/FasterXML/jackson-core/releases)
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.8.5...jackson-core-2.10.2)

Updates `jackson-databind` from 2.8.5 to 2.10.2
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `jackson-annotations` from 2.8.5 to 2.10.2
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-11 10:06:45 +02:00
c7c8940c5a Abstract document add module info file (#1118)
* Added module-info.java file in abstract document pattern

* Renamed module name and added the required module.
2020-01-11 09:53:09 +02:00
e88ea8a870 Fix markdown (#1131) 2020-01-11 09:44:59 +02:00
8618ab64f6 Bump guava-testlib from 19.0 to 23.0 (#1130)
Bumps [guava-testlib](https://github.com/google/guava) from 19.0 to 23.0.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/compare/v19.0...v23.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-11 09:31:38 +02:00
f1471641b0 Revert "Bump maven-war-plugin from 2.4 to 3.2.3 (#1129)"
This reverts commit b99d37506f.
2020-01-09 11:23:24 +02:00
b99d37506f Bump maven-war-plugin from 2.4 to 3.2.3 (#1129)
Bumps [maven-war-plugin](https://github.com/apache/maven-war-plugin) from 2.4 to 3.2.3.
- [Release notes](https://github.com/apache/maven-war-plugin/releases)
- [Commits](https://github.com/apache/maven-war-plugin/compare/maven-war-plugin-2.4...maven-war-plugin-3.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-08 22:22:49 +02:00
6c545c93e5 Bump mongo-java-driver from 3.3.0 to 3.12.0 (#1127)
Bumps [mongo-java-driver](https://github.com/mongodb/mongo-java-driver) from 3.3.0 to 3.12.0.
- [Release notes](https://github.com/mongodb/mongo-java-driver/releases)
- [Commits](https://github.com/mongodb/mongo-java-driver/compare/r3.3.0...r3.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-08 22:17:59 +02:00
f00523f7c0 Bump maven-surefire-plugin from 3.0.0-M3 to 3.0.0-M4 (#1126)
Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0-M3 to 3.0.0-M4.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.0.0-M3...surefire-3.0.0-M4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-08 22:16:54 +02:00
346cf0f793 LICENSE: Happy new year! (#1123)
* Update LICENSE.md

* Update LICENSE.md
2020-01-04 19:04:23 +02:00
20ea465b7f Java 11 migrate remaining q-r (#1121)
* Moves queue-load-leveling to Java 11

* Moves reactor to Java 11

* Moves reader-writer-lock to Java 11

* Moves repository to Java 11

* Moves resource-acquisition-is-initialization to Java 11

* Moves retry to Java 11

* Moves role-object to Java 11
2020-01-04 18:43:12 +02:00
cd2a2e7711 Java 11 migrate all remaining s (#1120)
* Moves saga to Java 11

* Moves semaphore to Java 11

* Moves servant to Java 11

* Moves serverless to Java 11

* Moves service-layer to Java 11

* Moves service-locator to Java 11

* Moves sharding to Java 11

* Moves singleton to Java 11

* Moves spatial-partition to Java 11

* Moves specification to Java 11

* Moves state to Java 11

* Moves step-builder to Java 11

* Moves strategy to Java 11

* Moves subclass-sandbox to Java 11

* Fixes checkstyle issues
2020-01-04 18:36:08 +02:00
310ae50248 Issue 989 final-batch (#1119)
* Adding support for maven assembly plugin to generate executable jar with all dependencies in built

* Merge branch 'master' into issue-989

# Conflicts:
#	abstract-document/pom.xml
#	pom.xml

* Adding maven assemly plugin for projects with name A

* Update in format as per checkstyle, i.e. Spcae in place of tab with size of 2

* batch set - 2 having all project with B and C

* issue-989 d-e-f

* fixing eip pom and adding g-h-i-l-m-n Skipping naked object as it seems it doesn't have main method, will consider this at end

* Adding for O and P projects Skipping Object-Mother as we don't have main method for same.

* Final batch
2019-12-29 14:41:21 +02:00
670c4e43f3 Java 11 migrate 7 remaining f (#1115)
* Moves facade to Java 11

* Moves factory-kit to Java 11

* Moves factory-method to Java 11

* Moves feature-toggle to Java 11

* Moves fluentinterface to Java 11

* Moves flux to Java 11

* Moves flyweight to Java 11

* Moves front-controller to Java 11

* Uses stream properly

* Resolves issues with ci
2019-12-22 14:41:19 +02:00
f835d3d516 Java 11 migrate remaining (g,h,i) (#1116)
* Moves game-loop to Java 11

* Moves guarded-suspension to Java 11

* Moves half-sync-half-async to Java 11

* Moves hexagonal to Java 11

* Moves intercepting-filter to Java 11

* Moves interpreter to Java 11

* Moves iterator to Java 11
2019-12-20 07:11:30 +02:00
7d0a5c0edb Issue 989 batch-2 (#1108)
* Adding support for maven assembly plugin to generate executable jar with all dependencies in built

* Merge branch 'master' into issue-989

# Conflicts:
#	abstract-document/pom.xml
#	pom.xml

* Adding maven assemly plugin for projects with name A

* Update in format as per checkstyle, i.e. Spcae in place of tab with size of 2

* batch set - 2 having all project with B and C

* issue-989 d-e-f

* fixing eip pom and adding g-h-i-l-m-n Skipping naked object as it seems it doesn't have main method, will consider this at end

* Adding for O and P projects Skipping Object-Mother as we don't have main method for same.
2019-12-18 22:04:08 +02:00
ea57934db6 Java 11 migrate c-d (remaining) (#1111)
* Moves converter pattern to Java 11

* Moves cqrs pattern to Java 11

* Moves dao pattern to Java 11

* Moves data-bus pattern to Java 11

* Moves data-locality pattern to Java 11

* Moves data-mapper pattern to Java 11

* Moves data-transfer-object pattern to Java 11

* Moves decorator pattern to Java 11

* Moves delegation pattern to Java 11

* Moves dependency-injection to Java 11

* Moves dirty-flag to Java 11

* Moves double-buffer to Java 11

* Moves double-checked-locking to Java 11

* Moves double-dispatch to Java 11

* Corrects with changes thats breaking test cases
2019-12-14 20:32:45 +02:00
5681684157 https://github.com/iluwatar/java-design-patterns-web/issues/8 Fix typo in tag 2019-12-13 22:22:11 +02:00
b2b1ba95eb https://github.com/iluwatar/java-design-patterns-web/issues/8 Update pattern categories and tags 2019-12-13 21:09:28 +02:00
0335c61512 Fix Acyclic Visitor readme layout 2019-12-13 09:36:57 +02:00
fb2c026822 Java 11 migrate remaining e (#1112)
* Moves eip-aggregator to Java 11

* Moves eip-message-channel to Java 11

* Moves eip-publish-subscribe to Java 11

* Moves eip-splitter to Java 11

* Moves eip-wire-tap to Java 11

* Moves event-aggregator to Java 11

* Moves event-asynchronous to Java 11

* Moves event-driven-architecture to Java 11

* Moves event-queue to Java 11

* Moves event-sourcing to Java 11

* Moves execute-around to Java 11

* Moves extension-objects to Java 11
2019-12-09 19:03:30 +02:00
b09b100614 #1113 Link uml-reverse-mapper created class diagrams to readme, where needed 2019-12-07 20:26:59 +02:00
0685a505d3 #1113 Add uml-reverse-mapper plugin 2019-12-07 18:03:49 +02:00
55769e9841 Update Method pattern (#1106)
* Add update method pattern

* Add unit tests

* Add README.md

* Resolve conflict
2019-12-01 15:06:19 +02:00
05e582ca3e Pattern combinator (#1105)
*  init

*  add pattern
2019-11-26 08:03:04 +02:00
a9c3df78ee Changes the description of the prototype pattern (#1102) 2019-11-19 21:57:20 +02:00
1fbe9bbac5 Changes the description of the template method pattern (as discussed in Issue1099) (#1101)
* Declares the template methods as final

* Extends the description of the template method pattern

* Removes the final declarations (this was done in another branch)
2019-11-19 21:49:07 +02:00
e0b728c5e2 Package patterns into executable jars setup (#1092)
* Adding support for maven assembly plugin to generate executable jar with all dependencies in built

* Merge branch 'master' into issue-989

# Conflicts:
#	abstract-document/pom.xml
#	pom.xml

* Adding maven assemly plugin for projects with name A

* Update in format as per checkstyle, i.e. Spcae in place of tab with size of 2
2019-11-19 21:37:19 +02:00
515b7e7134 Changes the implementation of the prototype pattern (#1103)
* Changes the implementation of the prototype pattern

* Fixes the checkstyle warnings

* Fixes additional checkstyle warnings
2019-11-19 09:34:24 +02:00
d4b2496e60 Update App.java (#1098) 2019-11-18 19:18:46 +02:00
7e4d0b4cdc Changes aggregation to composition (as described in issue #1095) (#1096) 2019-11-18 19:04:40 +02:00
8037495e04 Add some formatting to Specification pattern readme 2019-11-17 15:20:42 +02:00
6941e65cb4 Set version for next development iteration 2019-11-17 14:45:41 +02:00
7d845505b5 Java Design Patterns 1.22.0 2019-11-17 14:44:42 +02:00
73f9b8bef1 Adding composite specification (Issue#1093) (#1094)
* Resolution proposition to Issue#1055 (UML diagram left to do)

* Deciding not to modify the UML diagram for now

* Resolution proposition to Issue#1093

* Code reformatting
2019-11-17 14:25:32 +02:00
19b129c28e Fix several frontmatter issues 2019-11-16 21:56:40 +02:00
63c707fcb1 Add game-loop to parent pom.xml 2019-11-16 21:17:21 +02:00
cc4b990ae8 #590 Add explanation for Converter pattern 2019-11-16 21:06:05 +02:00
8747f1fd7a #1021 enforce Checkstyle rules in the build 2019-11-16 16:00:24 +02:00
9e58edf05e Merge branch 'master' of https://github.com/iluwatar/java-design-patterns 2019-11-16 14:56:36 +02:00
271d7ae9bd Resolves checkstyle errors for remaining p (#1091)
* Reduces checkstyle errors in page-object

* Reduces checkstyle errors in partial-response

* Reduces checkstyle errors in pipeline

* Reduces checkstyle errors in poison-pill

* Reduces checkstyle errors in priority-queue

* Reduces checkstyle errors in private-class-data

* Reduces checkstyle errors in property

* Reduces checkstyle errors in prototype

* Reduces checkstyle errors in proxy
2019-11-16 14:56:26 +02:00
26f4aa8001 Merge branch 'master' of https://github.com/iluwatar/java-design-patterns 2019-11-16 14:48:43 +02:00
1fdc650545 Resolves checkstyle errors for remaining m (#1090)
* Reduces checkstyle errors in marker

* Reduces checkstyle errors in master-worker-pattern

* Reduces checkstyle errors in mediator

* Reduces checkstyle errors in memento

* Reduces checkstyle errors in model-view-controller

* Reduces checkstyle errors in model-view-presenter

* Reduces checkstyle errors in module

* Reduces checkstyle errors in monad

* Reduces checkstyle errors in monostate

* Reduces checkstyle errors in multiton

* Reduces checkstyle errors in mute-idiom

* Reduces checkstyle errors in mutex
2019-11-16 14:48:23 +02:00
3ccc9baa1a Game Loop Pattern (#1083)
* Add game loop module

* Add game loop module

* Fix merge issue

* Implement game loop module

* Implement game loop module

* Implement time based game loop

* implement VariableStepGameLoop

* Implement FixedStepGameLoop

* Add UT

* Add Unit tests

* Fix checkstyle issues

* Add README.md

* Fix code review issues

* Fix code review issues

* update README.md
2019-11-16 14:40:23 +02:00
df8a4e3b47 Adding parameterized specification (Issue#1055) (#1088)
* Resolution proposition to Issue#1055 (UML diagram left to do)

* Deciding not to modify the UML diagram for now
2019-11-16 14:24:46 +02:00
cc571f4149 Saga pattern (#1062)
* init repo for role object

* add to init

*  add to init

*  add first impl

*  add pattern

*  add license

*  add changes

*  add saga init dsc

* add init saga dsc

*  add changes to dsc

*  add

*  add orchestrator

*  add ch

* separate pkgs

*  add info

*  add choreogr

*  rem space

*  change according to cgeckstyle

*  add changes according to google style
2019-11-14 08:03:50 +02:00
51b444dccf Merge branch 'master' of https://github.com/besok/java-design-patterns 2019-11-14 08:02:05 +02:00
50467c9e76 Java 11 migration: patterns (t-v) (#1085)
* Moves visitor pattern to java 11

* Moves value-object pattern to java 11

* Moves unit-of-work pattern to java 11

* Moves typeobjectpattern pattern to java 11

* Moves twin pattern to java 11

* Moves trampoline pattern to java 11

* Moves tolerant-reader pattern to java 11

* Moves tls pattern to java 11

* Moves throttling pattern to java 11

* Moves thread-pool pattern to java 11

* Moves template-method pattern to java 11
2019-11-14 07:42:05 +02:00
87af122509 add changes according to google style 2019-11-13 21:01:10 +00:00
160b737dcc Add another real world example for Builder 2019-11-13 18:16:50 +02:00
f04fc3c0dc Java 11 migration: patterns starting with a (#1084)
* Moves abstract-factory pattern to java 11

* Moves abstract-document pattern to java 11

* Moves acyclic-visitor pattern to java 11

* Moves adapter pattern to java 11

* Moves aggregator-microservices pattern to java 11

* Moves api-gateway pattern to java 11
2019-11-13 18:04:51 +02:00
3c57bf7078 #984 #987 update readmes 2019-11-12 22:12:47 +02:00
33ea7335b1 Java 11 migration: patterns (remaining b-c) (#1081)
* Moves business-delegate pattern  to java 11

* Moves bytecode pattern  to java 11

* Moves caching pattern  to java 11

* Moves callback pattern  to java 11

* Moves chain pattern  to java 11

* Moves circuit-breaker pattern  to java 11

* Moves collection-pipeline pattern  to java 11

* Moves command pattern  to java 11

* Moves commander pattern  to java 11

* Moves composite pattern  to java 11

* Corrects test cases
2019-11-12 21:56:46 +02:00
6ef840f3cf Resolves checkstyle errors for naked-objects null-object object-mother object-pool observer queue-load-leveling (#1082)
* Reduces checkstyle errors in naked-objects

* Reduces checkstyle errors in null-object

* Reduces checkstyle errors in object-mother

* Reduces checkstyle errors in object-pool

* Reduces checkstyle errors in observer

* Reduces checkstyle errors in queue-load-leveling
2019-11-12 21:26:15 +02:00
1e76d91929 Resolves checkstyle errors for abstract-document abstract-factory acyclic-visitor adapter aggregator-microservices (#1080)
* Reduces checkstyle errors in abstract-document

* Reduces checkstyle errors in abstract-factory

* Reduces checkstyle errors in acyclic-visitor

* Reduces checkstyle errors in adapter

* Reduces checkstyle errors in aggregator-microservices
2019-11-11 22:30:08 +02:00
390795154f Resolves checkstyle issues for semaphore servant serverless service-layer service-locator (#1079)
* Reduces checkstyle errors in semaphore

* Reduces checkstyle errors in servant

* Reduces checkstyle errors in serverless

* Reduces checkstyle errors in service-layer

* Reduces checkstyle errors in service-locator
2019-11-11 22:27:43 +02:00
37599eb48f Resolves checkstyle errors for feature-toggle fluentinterface flux flyweight front-controller (#1078)
* Reduces checkstyle errors in feature-toggle

* Reduces checkstyle errors in fluentinterface

* Reduces checkstyle errors in flux

* Reduces checkstyle errors in flyweight

* Reduces checkstyle errors in front-controller
2019-11-11 22:24:23 +02:00
c954a436ad Resolves checkstyle errors for facade factory-kit spatial-partition state step-builder (#1077)
* Reduces checkstyle errors in facade

* Reduces checkstyle errors in factory-kit

* Reduces checkstyle errors in spatial-partition

* Reduces checkstyle errors in state

* Reduces checkstyle errors in step-builder
2019-11-11 22:21:12 +02:00
2628cc0dfc #984 update Builder readme 2019-11-11 22:10:31 +02:00
0272d71851 #984 update Bridge readme 2019-11-11 22:07:54 +02:00
329479dda0 #984 update Ambassador readme 2019-11-11 22:03:44 +02:00
c4418311c6 Java 11 migration: ambassador async-method-invocation balking bridge builder (#1076)
* Moves ambassador pattern to java 11

* Moves async-method-invocation pattern  to java 11

* Moves balking pattern  to java 11

* Moves bridge pattern  to java 11

* Moves builder pattern  to java 11
2019-11-11 21:47:09 +02:00
f0f0143d48 Resolves checkstyle errors for trampoline twin typeobjectpattern unit-of-work value-object (#1074)
* Reduces checkstyle errors in trampoline

* Reduces checkstyle errors in twin

* Reduces checkstyle errors in typeobjectpattern

* Reduces checkstyle errors in unit-of-work

* Reduces checkstyle errors in value-object
2019-11-10 19:47:32 +02:00
b92eb5229d Resolves checkstyle errors for template-method thread-pool throttling tls tolerant-reader (#1073)
* Reduces checkstyle errors in template-method

* Reduces checkstyle errors in thread-pool

* Reduces checkstyle errors in throttling

* Reduces checkstyle errors in tls

* Reduces checkstyle errors in tolerant-reader
2019-11-10 19:45:17 +02:00
9c8ad4485b Resolves checkstyle errors for patterns starting with letter r (#1072)
* Reduces checkstyle errors in reactor

* Reduces checkstyle errors in reader-writer-lock

* Reduces checkstyle errors in repository

* Reduces checkstyle errors in resource-acquisition-is-initialization

* Reduces checkstyle errors in retry
2019-11-10 19:42:26 +02:00
4dae1fae57 Resolves checkstyle errors for execute-around extension-objects (#1071)
* Reduces checkstyle errors in execute-around

* Reduces checkstyle errors in extension-objects
2019-11-10 19:38:51 +02:00
5ae2ce6e2e Resolves checkstyle errors for event-* (#1070)
* Reduces checkstyle errors in event-aggregator

* Reduces checkstyle errors in event-asynchronous

* Reduces checkstyle errors in event-driven-architecture

* Reduces checkstyle errors in event-queue

* Reduces checkstyle errors in event-sourcing
2019-11-10 19:37:10 +02:00
7c888e8886 Resolves checkstyle errors for eip-* (#1069)
* Reduces checkstyle errors in eip-aggregator

* Reduces checkstyle errors in eip-message-channel

* Reduces checkstyle errors in eip-publish-subscribe

* Reduces checkstyle errors in eip-splitter

* Reduces checkstyle errors in eip-wire-tap
2019-11-10 19:34:42 +02:00
f2c91eb836 Resolves checkstyle errors for delegation dependency-injection dirty-flag double-buffer double-checked-locking double-dispatch (#1068)
* Reduces checkstyle errors in delegation

* Reduces checkstyle errors in dependency-injection

* Reduces checkstyle errors in dirty-flag

* Reduces checkstyle errors in double-buffer

* Reduces checkstyle errors in double-checked-locking

* Reduces checkstyle errors in double-dispatch
2019-11-10 19:31:19 +02:00
01e489c77b Resolves checkstyle errors for dao data-bus data-locality data-mapper data-transfer-object decorator (#1067)
* Reduces checkstyle errors in dao

* Reduces checkstyle errors in data-bus

* Reduces checkstyle errors in data-locality

* Reduces checkstyle errors in data-mapper

* Reduces checkstyle errors in data-transfer-object

* Reduces checkstyle errors in decorator
2019-11-10 19:27:09 +02:00
eae09fc07e Resolves checkstyle errors for api-gateway, lazy-loading, leader-election (#1066)
* Reduces checkstyle errors in lazy-loading

* Reduces checkstyle errors in leader-election

* Reduces checkstyle errors in api-gateway
2019-11-10 19:13:40 +02:00
7f06f3b78c Resolves checkstyle errors for intercepting-filter, interpreter, iterator (#1065)
* Reduces checkstyle errors in intercepting-filter

* Reduces checkstyle errors in interpreter

* Reduces checkstyle errors in iterator
2019-11-10 19:05:05 +02:00
dda09535e6 Resolves checkstyle errors for guarded-suspension, half-sync-half-async, hexagonal (#1064)
* Reduces checkstyle errors in guarded-suspension

* Reduces checkstyle errors in half-sync-half-async

* Reduces checkstyle errors in hexagonal
2019-11-10 19:01:32 +02:00
4f9ee0189c Resolves checkstyle errors for converter, cqrs (#1063)
* Reduces checkstyle errors in converter

* Reduces checkstyle errors in cqrs
2019-11-10 18:39:27 +02:00
de56cbb971 change according to cgeckstyle 2019-11-10 13:09:54 +00:00
2f49648047 Resolves checkstyle errors for collection-pipeline, command, commander (#1061)
* Reduces checkstyle errors in collection-pipeline

* Reduces checkstyle errors in command

* Reduces checkstyle errors in commander
2019-11-09 21:35:15 +02:00
31f27a720b Resolves checkstyle errors for callback, chain, circuit-breaker (#1060)
* Reduces checkstyle errors in callback

* Reduces checkstyle errors in chain

* Reduces checkstyle errors in circuit-breaker
2019-11-09 21:27:14 +02:00
efc17fcc70 Resolves checkstyle errors for business-delegate, bytecode, caching (#1059)
* Reduces checkstyle errors in business-delegate

* Reduces checkstyle errors in bytecode

* Reduces checkstyle errors in caching
2019-11-09 21:23:12 +02:00
6d1c0b1563 Resolves checkstyle errors for ambassador, async-method-invocation, balking, bridge, builder (#1058)
* Decreases checkstyle errors for ambassador pattern

* Reduces checkstyle errors in async-method-invocation

* Reduces checkstyle errors in balking

* Reduces checkstyle errors in bridge

* Reduces checkstyle errors in builder
2019-11-09 21:03:22 +02:00
74c7273381 rem space 2019-11-09 18:57:31 +00:00
8f85353baf merge changes 2019-11-09 17:56:15 +00:00
09b4663b9a add choreogr 2019-11-09 17:42:49 +00:00
1fa8a604eb Sharding Pattern (#1056)
* Create sharding module

* Add Unit Tests

* Fix readme hyperlink

* Fix check-style issue
2019-11-08 08:20:32 +02:00
50986fa15b #590 arrange Layers into packages and add explanation 2019-11-05 20:07:50 +02:00
8ecdee44c8 #1021 Checkstyle fixes for Layers 2019-11-05 17:38:05 +02:00
47ae477a56 #1021 Checkstyle changes for Factory Method 2019-11-05 17:28:08 +02:00
7dc47da131 #1021 Checkstyle fixes for Composite pattern 2019-11-05 17:22:53 +02:00
fbcfeb072a add info 2019-11-03 12:52:38 +00:00
ffeee2f1a4 separate pkgs 2019-11-03 12:35:01 +00:00
1b32e23493 add ch 2019-11-03 12:03:33 +00:00
3a4677c56d add orchestrator 2019-11-02 20:52:59 +00:00
c4c37d77e9 add 2019-11-02 14:45:05 +00:00
0b17abdf11 #590 Add explanation for Specification pattern 2019-11-02 14:45:50 +02:00
7ac47b291d add changes to dsc 2019-11-02 11:39:02 +00:00
564cf1239f add init saga dsc 2019-11-02 11:30:41 +00:00
768e647108 add saga init dsc 2019-11-02 11:29:52 +00:00
a8c7771784 #1021 style changes for Specification 2019-11-01 20:23:01 +02:00
1d4a7681e2 Fix for Issue #549 : Add Fallbacks in Aggregator Service (#971)
*  Fix for Issue##549

Catch ClientProtocolException and Update Error Logs

* Fix indentation, checkstyle errors

* Fix for Issue #549
Add fallbacks in Aggregator service when other microservices fail

* Make ProductInventoryClientImpl return null instead of zero in case of failure
2019-11-01 20:01:30 +02:00
55b0341c8d Fix remaining Checkstyle errors for Singleton 2019-10-31 20:01:39 +02:00
3b1a28149b decrease number of checkstyle errors in singleton, strategy and visitor patterns #1021 (#1054)
* fix checkstlye errors - visitor pattern

* fix checkstlye errors - strategy pattern

* fix checkstlye errors - singleton pattern
2019-10-31 19:54:13 +02:00
1eb1961f1b Remove presentations 2019-10-30 21:12:10 +02:00
cc85c73fbc Move faq.md to java-design-patterns-web repository 2019-10-30 19:52:25 +02:00
cdb80b8ddd Issue 893 (#1014)
* Using static object to reduce memory foot prints

* Updating README along with name of static fields

* Updating code as per review comments

* Updating code as per review comments

* Updating doc as per new code
2019-10-30 08:27:24 +02:00
a9dfd7e809 Update license header 2019-10-30 08:23:45 +02:00
fca7e9c8c7 https://github.com/iluwatar/java-design-patterns/issues/1021 - decrease number of checkstyle errors in callback pattern (#1053) 2019-10-30 08:19:33 +02:00
91a085d3d1 Update script 2019-10-30 08:15:43 +02:00
ff52848481 Update script 2019-10-29 23:28:05 +02:00
ccc1a6340b Update script 2019-10-29 23:02:24 +02:00
a65a601835 Update web site logic 2019-10-29 22:11:27 +02:00
c8a481bb77 Add java 11 support for #987 (o-t) (#1051)
* Use java 11

* Use .of
- Replace Arrays.asList with List.of
- Replace HashSet<>(List.of()) with Set.of

* Formatting
2019-10-29 08:37:40 +02:00
dd971d8c19 Use java 11 (#1050) 2019-10-28 17:02:17 +02:00
6bb3438965 Add java 11 (#1049) 2019-10-27 22:08:09 +02:00
63fb8dc318 Add java 11 (#1048) 2019-10-27 22:05:10 +02:00
b50189e283 Fix Role Object front matter 2019-10-26 21:26:42 +03:00
9f7e3fe552 Update license headers 2019-10-26 21:09:19 +03:00
d1767bbb51 The pattern Role object (#1031)
* init repo for role object

* add to init

*  add to init

*  add first impl

*  add pattern

*  add license

*  add changes
2019-10-26 20:58:40 +03:00
5d47488fe9 Fix error when building from a submodule directory (#1045)
Add directory-maven-plugin to resolve the location of the
license-plugin-header-style.xml from a submodule directory
2019-10-26 20:43:28 +03:00
d01a3a66b4 Update Github token 2019-10-26 20:32:50 +03:00
e3827945c8 add changes 2019-10-26 18:28:20 +01:00
fadad43f8b #984 for unitofwork, tolerantreader, twin (#1044)
* #984 for unitofwork, tolerantreader, twin

* #984 for unitofwork, tolerantreader, twin

* #987 for visitor, value-object, unitofwork, typeobjectpattern, tolerantreader, twin, tranpoline
2019-10-26 18:58:56 +03:00
c7fee7bb07 local variable type inference changes (#1042)
* local variable type inference changes

local variable type inference changes for thread pool design pattern

* local variable type inference changes

local variable type inference changes for ThreadPool design pattern
2019-10-26 18:50:47 +03:00
954e7300e9 local variable type inference changes (#1043)
local variable type inference changes for throttling design pattern
2019-10-26 18:49:28 +03:00
03e1e92b52 local variable type inference changes (#1041)
local variable type inference changes for template method design pattern
2019-10-26 18:47:43 +03:00
af8c5ed0dd local variable type inference changes (#1040)
local variable type inference changes for strategy design pattern
2019-10-26 18:45:54 +03:00
349d8edebf local variable type inference changes (#1039)
local variable type inference changes for step builder design pattern
2019-10-26 18:43:52 +03:00
12f13a631e local variable infere changes (#1038)
local variable infere changes for STATE design pattern
2019-10-26 18:41:39 +03:00
0b8d78e4bf local variable type inference changes (#1036)
local variable type inference changes for design pattern singleton
2019-10-26 18:40:14 +03:00
58d8fa1758 local variable type inference changes (#1035)
local variable type inference changes for design pattern service locator
2019-10-26 18:38:09 +03:00
f7a53f2d17 service-layer local type inference changes (#1034)
local variable type inference for service-layer design patterns
2019-10-26 18:35:32 +03:00
70ddeaa194 Create FUNDING.yml 2019-10-26 15:12:05 +03:00
6aeafcf2aa https://github.com/iluwatar/java-design-patterns/issues/1016 - decrease number of checkstyle errors in adapter pattern (#1033) 2019-10-26 08:34:30 +03:00
1cb1bdcb57 https://github.com/iluwatar/java-design-patterns/issues/1009 - remove child poms overhead information (#1030)
* https://github.com/iluwatar/java-design-patterns/issues/1009 - remove child versions

* https://github.com/iluwatar/java-design-patterns/issues/1009 - add custom jaxb version for cqrs
2019-10-25 06:58:33 +03:00
1b6cecda19 Update keywords 2019-10-24 23:30:08 +03:00
9403d53096 add license 2019-10-24 20:59:21 +01:00
630532cdda add pattern 2019-10-24 20:56:09 +01:00
acaa6cdc62 local variable type inference changes (#1028)
* local variable type inference changes

replacing type with var

* the type changed back to String

since it is initializing to null and later having different value, it is throwing error in Travis-CI.  Made changes.
2019-10-23 17:25:45 +03:00
4904d7eea0 #1021: Fix checkstyle warnings by changing the license header template (#1027)
* Add custom license header style in order to comply with Google's Checkstyle format

* Update license headers to comply with Google's Checkstyle format
2019-10-22 08:15:35 +03:00
c81c3ff1c7 Use local variable type inference (#995)
* "visitor" pattern: Use local variable type inference

Update "visitor" pattern with local variable type inference.

* "value-object" pattern: Use local variable type inference

Update "value-object" pattern with local variable type inference.

* "unit-of-work" pattern: Use local variable type inference

Update "value-object" pattern with local variable type inference.

* "typeobjectpattern" pattern: Use local variable type inference

Update "value-object" pattern with local variable type inference.
2019-10-21 08:09:29 +03:00
5fc03ee9f8 improve grammar of README (#945)
* improve grammar of README

* Update README.md
2019-10-20 23:21:48 +03:00
20b4195fb2 add first impl 2019-10-20 20:22:54 +01:00
f00ebe1a8d #984 local variable inference changes (#1025)
* #984 Fix for abstract-document, abstract-factory, acyclic-visitor, adapter, aggregator-microservices

* #984 Fix for abstract-document, abstract-factory, acyclic-visitor, adapter, aggregator-microservices
2019-10-20 19:01:02 +03:00
2217fbc5ff Issue#550: double buffer pattern (#1024)
* Basic implementation

* implement double buffer

* add unit test

* add unit test

* Add Readme

* Change local value declaration to var

* Remove unused fields
2019-10-20 18:55:36 +03:00
82f9a6c232 1010: Fixed the two remaining SonarCloud errors (#1023)
The two remaining files were still creating a Random everytime the method
was called. These were missed in the previous commit because the previous
commit had fixed only one of the methods; in other words, there were
multiple methods that were creating the Random object on each call.
2019-10-20 09:02:36 +03:00
f671f03d13 Update FAQ metadata 2019-10-19 22:14:01 +03:00
f09a7eb468 add to init 2019-10-19 18:15:20 +01:00
7c5d5f6b0d 1010: Fixed all of the blocking and critical Sonarcloud errors (#1020)
* 1011: Added SuppressWarnings for SonarCloud errors

All of these files are causing SonarCloud to report the following error:

Loops should not be infinite

Since these instances all require an infinite loop that will never end,
these warnings should be disabled so that SonarCloud no longer reports
them as error.

The rule is: squid:S2189

* 1011: Made all of the randoms static and final

According to SonarCloud rule: "Random" objects should be reused, randoms
should not be recreated. This commit has taken all of the Randoms and made
them constant variables in the files that are using them.
2019-10-19 20:04:44 +03:00
8a4844792f Remove obsolete file 2019-10-19 19:44:57 +03:00
0c60a95d8f Switched to embedded Google checkstyle rules (#1018)
* Switched to embedded Google checkstyle rules

Moved the configuration out of the execution to make it used in all
executions. Fixes #1016

* #1016: Moved checkstyle configuration back into execution

This refactoring may be better done in a new issue as it may have too
many implication.

* Replaced consoleOutput and failsOnError by failOnViolation

consoleOutput outputs everything while failsOnError just fails the build
but doesn't log the error. failOnViolation fails on a violation and logs
it (logViolationsToConsole defaults to true).
2019-10-19 18:41:12 +03:00
c3656109a7 add to init 2019-10-19 16:23:39 +01:00
a204383f45 init repo for role object 2019-10-19 16:17:59 +01:00
2982db456d Update README.md 2019-10-18 23:09:27 +03:00
c308ca09e5 1011: Fixed all of the SonarCloud blocking errors (#1017)
* 1011: Added the method to the RequestMapping annotation

* 1011: Changed all of the a href blank targets to include rel="noopener noreferrer"
2019-10-18 08:50:02 +03:00
880b234d8f Fixes #1007 by updating JUnit to 5.5.2 (#1015)
The missing class PreconditionViolationException is contained in
junit-platform-commons which comes in transitively by this JUnit
version. junit-jupiter-api had to be added because
spring-boot-dependencies imports an older version of this dependency.
2019-10-17 21:00:32 +03:00
a5646b63c1 #554: Subclass Sandbox pattern (#998)
* Fix issue #761: ThreadSafeDoubleCheckLocking.java: Instantiating by Reflection call will be successful if you do that firstly

* Create leader election module

* Create Interface of Instance and MessageManager

* Create implementations with token ring algorithm

* Change package structure.
Create basic message system.

* Implement heartbeat and heartbeat invoking message system

* Implement election message handler

* Add leader message handler

* Add main entry point

* Add comments

* Update README.md

* Fix checkstyle issue

* Add Unit Tests

* Add Unit Tests

* Add bully leader selection

* Change System.out to log print.
Add MIT license in each file.

* Add More java doc comments

* Add unit test

* Add unit tests

* Add subclass-sandbox

* Add Unit Test

* Add Unit Test

* Fix Typo

* Move dependency into parent pom.xml

* Change local valuable reference to be var
2019-10-16 18:21:06 +03:00
27c131c2cb #1001 fix intermittent test failure (#1008) 2019-10-15 19:37:35 +03:00
c438ec0557 Intermittent test failure in Spatial Partition pattern #1001 (#1006)
* Intermittent test failure in Spatial Partition pattern #1001

* Intermittent test failure in Spatial Partition pattern #1001
2019-10-15 19:33:36 +03:00
dd5997b495 993: Fixed the pipeines project layout so that it will load in Eclipse (#1004)
The source directory was not working in the 2019.09 version of Eclipse. The
problem was in the layout of the project: after the src/main/java and
src/test/java, the directory was naed com.iluwatar.pipeline. It should've
been com/iluwatar/pipeline. This follows the hierarchy of all of the other
patterns.

Once these files were moved, the Pipeline project compiled without errors.
2019-10-15 19:21:07 +03:00
e6c71b63fc 988: Replaced all of the Apache HttpClients with Java's java.net.http (#1003)
* 988: Took out the apache http component from root pom.xml

* 988: Updated the aggregator sub projects to use java.net.http instead of apache

* 988: Updated the api-gateway-service sub projects to use java.net.http instead of apache

* Applied the code style formatter
2019-10-15 19:14:08 +03:00
7e698a90dd Fix for issue #413: Circuit Breaker Pattern (#986)
* Fix Issue #413: Circuit-Breaker Pattern

* Fix Image Links

* Remove Javadoc plugin to ensure correct build

* Implementing code review feedback

* Sync README with actual code
2019-10-14 21:32:19 +03:00
088bb764f3 #996 disable sonar analysis for pull requests (#999) 2019-10-14 20:25:35 +03:00
47d92bbffb #996 set sonar host url 2019-10-14 08:17:52 +03:00
cfdfedbd2e #970 single logging framework should be enforced (#982)
* #496 Add pipeline module to parent pom 

* #496: Add main application class and test for pipeline

* #496: Checkstyle format and add log messages on pipeline stages 🎨

* #496: Fill readme sections of pipeline 

* #496: Javadocs and checkstyle formatting 🎨

* #496: Follow PMD checks and add more explanation as block comment on App.java

* #496: Apply requested PR changes by iluwatar 🎨

* #970: Replace log4j usage on commander pattern to Slf4j API 🎨

* #970: Replace log4j usage on dao pattern to Slf4j API 🎨

* #970: Replace log4j usage on data mapper pattern to Slf4j API 🎨

* #970: Remove log4j dependency on data transfer object pom 🔥

* #970: Replace log4j usage on module pattern to Slf4j API 🎨

* #970: Replace log4j usage on serverless pattern to Slf4j API 🎨

This also removes the aws log4j dependency

* #970: Remove unnecessary gitignore line for log4j.xml 🔥

* #970: Remove remaining remnants of log4j 🔥

* #970: Replace System.out logging with appropriate logging methods 🎨

* #970: Replace System.out method references to Logger::info 🎨
2019-10-13 23:41:11 +03:00
72b174619f #996 Fix SonarCloud analysis failure (#997)
* #996 Update Travis config

* #996 Remove old secret

* #996 add coverage profile

* #996 move jacoco out of profile
2019-10-13 23:15:02 +03:00
9ebbc421dd Update license headers 2019-10-12 20:05:54 +03:00
fcc1c0a27c [mvn] - Remove maven-pmd-plugin from the project (#977) (#979) 2019-10-12 12:58:48 +03:00
6faec9901a Bump java language to 11 (#980)
* Moved java XML and annotations dependencies to project level instead
of as profiles
* Set compiler language level to 11
* Removed jdk8 from travis build

* Kept java level 8 in naked-objects/dom for datanucleus enhancer, for
now.
2019-10-12 08:39:58 +03:00
e36bbbb22b Maven profiles to support jdk 11 builds. #948 (#975)
* Maven profiles to support jdk 11 builds. #948

Added maven profiles activated by jdk 11, wich will not break java 8 support.
Bumped lombok and datanucleus enhancer as the old versions dont work with 11.

* Fixed PMD issue when building naked-objects

* Fixed the eip modules with xml dependencies.

Previous dependency relaxing commit causes xml libs to go missing from
some modules that actually needed them
2019-10-11 21:55:48 +03:00
71f26c3e59 Fix Travis xvfb 2019-10-11 19:37:28 +03:00
795b6be17d Configure Travis to build on JDK8 and JDK11 2019-10-11 19:28:50 +03:00
90ea4506ca Leader Election Pattern (#923)
* Fix issue #761: ThreadSafeDoubleCheckLocking.java: Instantiating by Reflection call will be successful if you do that firstly

* Create leader election module

* Create Interface of Instance and MessageManager

* Create implementations with token ring algorithm

* Change package structure.
Create basic message system.

* Implement heartbeat and heartbeat invoking message system

* Implement election message handler

* Add leader message handler

* Add main entry point

* Add comments

* Update README.md

* Fix checkstyle issue

* Add Unit Tests

* Add Unit Tests

* Add bully leader selection

* Change System.out to log print.
Add MIT license in each file.

* Add More java doc comments

* Add unit test

* Add unit tests
2019-10-08 18:29:59 +03:00
41b8d80479 Close #969 (#972) 2019-10-08 18:08:56 +03:00
f903d7e9a9 #496 Pipeline pattern (#967)
* #496 Add pipeline module to parent pom 

* #496: Add main application class and test for pipeline

* #496: Checkstyle format and add log messages on pipeline stages 🎨

* #496: Fill readme sections of pipeline 

* #496: Javadocs and checkstyle formatting 🎨

* #496: Follow PMD checks and add more explanation as block comment on App.java

* #496: Apply requested PR changes by iluwatar 🎨
2019-10-08 09:19:28 +03:00
84c4b034a9 Fix: Github reports security vulnerabilities #933 (#960)
* Fix: Github reports security vulnerabilities  #933

Upgrade camel and spring-data

* -Fix github security vulnerabilities in spring-data and camel

* -Code changes for review comments
2019-10-08 07:42:54 +03:00
f5455f9887 update buggy dependencies (#968) 2019-10-07 19:10:26 +03:00
2b1c09aa72 Fix link in Acyclic Visitor 2019-10-07 09:45:06 +03:00
94ca254626 Fix for issue #954 : Add external Dependencies to run with Java11 (#957)
* Fix for issue #954
Add javax.annotation and java.xml.bind as external maven dependencies
Verified with jdk-11

* Move dependency versions to main pom.xml's dependencyManagement section
2019-10-06 19:06:39 +03:00
60171e3c87 Fix for Issue #549 : Update Exception Handling Code in Aggregator Microservice (#958)
*  Fix for Issue##549

Catch ClientProtocolException and Update Error Logs

* Fix indentation, checkstyle errors
2019-10-06 18:27:39 +03:00
933de30d42 Add JXR plugin to get rid of WARNING Unable to locate Source XRef to link to (#952) 2019-10-05 18:01:23 +03:00
364c43a73a Get rid of build warnings WARNING about problems found when building the effective model (#953) 2019-10-05 17:13:08 +03:00
218ba44dbf Upgrade of maven plugins (#951)
* Upgrade maven plugins

* Upgrade maven plugins

Some general code cleanup was necessary due to upgrade of PMD and checkstyle.

Also needed to add Junit 4 as a dependency due to Mockito.timout issue found here:
https://github.com/mockito/mockito/issues/152
2019-10-05 14:23:20 +03:00
05d0f0babf #834 Fix dependency management issue for POM files (#940) 2019-10-03 21:50:50 +03:00
823c58bef2 added new information (#937) 2019-10-02 10:53:57 +03:00
b03e0b8c35 Fix for BallThreadTest#testResume (#935)
* Fix for flaky test

* Remove other file changes

* Remove other file changes

* Remove other file changes not related to bug
2019-10-01 21:34:19 +03:00
3d62e02891 fixed bug #929: close async service before the main thread finishes (#931) 2019-09-30 18:32:29 +03:00
06fa92af2c Removing the dead link to resove automagic issue as mentioned in issue#915 (#927) 2019-09-30 18:27:02 +03:00
6b297b701f Data Locality pattern #559 (#889)
* Data Locality pattern #559

* Fixed review comments

* updated pom

* Fixed failed build
2019-09-30 18:19:08 +03:00
5f39f7fbf7 Updating README.md file to update doc as suggested in issue#925 (#926) 2019-09-20 08:08:43 +03:00
019abc9980 Add license headers 2019-09-10 20:26:18 +03:00
b874adc296 Set version for next development iteration 2019-09-08 11:01:12 +03:00
9bf7a059b8 Java Design Patterns v1.21.0 2019-09-08 10:49:40 +03:00
88fae070e6 Fix broken links #915 (#921) 2019-09-07 21:18:13 +03:00
f1410337b5 Fix issue #761: ThreadSafeDoubleCheckLocking.java: Instantiating by Reflection call will be successful if you do that firstly (#920) 2019-09-07 21:13:15 +03:00
8c865e6b4d clean code (#910) 2019-09-07 21:07:01 +03:00
c653edf38f fix must override a superclass method (#919)
* fix must override a superclass method

* fix must override a superclass method
2019-09-07 20:52:49 +03:00
35dc25d480 MInor bug fix Issue #895 -> Code comment change (https://github.com/iluwatar/java-design-patterns/issues/895) (#901) 2019-09-07 20:24:40 +03:00
318f811fea Bytecode pattern #553 (#896)
* Added bytecode pattern

* Diagram changed and added licence information

* Added bytecode module to main pom.

* Fixed missing dependency error
2019-09-03 21:50:48 +03:00
7f6067f19f Added priority queue design pattern (#888)
* added priority queue design pattern

* Minor Refactored, fixed review comments
2019-08-31 21:10:35 +03:00
11c0550559 Create .sonarcloud.properties 2019-08-21 21:51:27 +03:00
085e47b50d Update SonarCloud badge 2019-08-21 21:47:36 +03:00
61ef59de02 fix code example containing syntax error (#890) 2019-08-11 21:06:27 +03:00
ccb257d525 fixed bug #883 (#885) 2019-08-04 17:11:56 +03:00
6daaeec5c6 Remove the transitive dependency(junit-jupiter-api) (#916) 2019-07-30 22:46:38 +03:00
517c20960d Added one more Credit/Article about the benefits of Repository pattern (#882) 2019-07-29 21:31:42 +03:00
36e80c4e69 fixed failing tests (#860) (#880) 2019-07-29 21:27:08 +03:00
3454941dcd Typo coresponding -> corresponding (#879) 2019-07-29 21:22:56 +03:00
b497d41f61 Modify Observer pattern UML (#877) 2019-07-29 21:21:07 +03:00
aaabc8f517 Fix the dependency conflict issue (#872) 2019-07-29 21:16:21 +03:00
2757b210ea Best practice when compare enum (#869) 2019-07-29 21:12:14 +03:00
d9a567cf97 Commander pattern #505 (#857)
* Commander pattern

* Fix checkstyle errors

* Update Commander.java

* Update README.md

* Update PaymentService.java

* Update Commander.java

* Update README.md
2019-07-29 21:09:08 +03:00
a113de6a14 Add licenses 2019-07-28 16:24:14 +03:00
f7e22a1cf6 508 : Sonar qube critical Issue Fix (#854)
* 508 : Sonar qube critical Issue Fix
Refactor this method to reduce its Cognitive Complexity from 30 to the 15 allowed.

* 508: Sonar Qube Issue fxes
Define a constant instead of duplicating this literal " does not exist." 3 times.

* 508: sonar qube issue fixes
Define a constant instead of duplicating this literal "Some external api for only realtime execution could be called here." 3 times.
2019-07-28 15:42:03 +03:00
c6ecf58687 508 : sonar qube critical issue fixes (#852)
* 508 : sonar qube critical issue fixes

* 508 : Sunar Qube Fixes
Define a constant instead of duplicating this literal "user_accounts" 4 times.
Define a constant instead of duplicating this literal "userID" 5 times
Define a constant instead of duplicating this literal "additionalInfo" 4 times.
Define a constant instead of duplicating this literal "userName" 4 times.

* 508 : Sunar Qube Fixes
Define a constant instead of duplicating this literal "user_accounts" 4 times.

* 508 : Sonar Qube Fixes
Define a constant instead of duplicating this literal "eEvans" 4 times
Define a constant instead of duplicating this literal "jBloch" 6 times
Define a constant instead of duplicating this literal "mFowler" 3 times

* 508 : Sonar Qube FIxes
Define a constant instead of duplicating this literal "username" 3 times.

* 508: sonar qube issue fixes
Define a constant instead of duplicating this literal "customerDao.getAllCustomers(): " 4 times.

* 508 : sonar qube issue fixes
Define a constant instead of duplicating this literal "App.main(), student : " 4 times.

* 508 : sonar Qube issue fixes
Define a constant instead of duplicating this literal "{} hits {}. {} is damaged!" 3 times.
Define a constant instead of duplicating this literal "{} hits {}." 4 times.

* 508 : Define a constant instead of duplicating this literal "{} hits {}." 4 times.

* 508 : checkstyle fixes

* 508: checkstyle fixes

* 508: checkstyle fixes

* 508: checkstyle fixes

* 508: checkstyle fixes

* 508: checkstyle fixes

* 508: cqrs checkstyle fixes
2019-07-28 15:39:40 +03:00
17bfc91f45 Change Travis CI build env. to Trusty (#911) 2019-07-28 14:20:18 +03:00
0c6237c225 Type object pattern #555 (#848)
* typeobject pattern

* fixing errors

* fix error cellpool

* Update README.md

* Update README.md
2019-07-24 22:08:30 +03:00
fedc2d9e47 Minor ReadMe Update (#864)
Two sentences read a little awkward, so I tweaked them. Hope this helps!
2019-04-07 08:41:35 +03:00
b6b4602baf 845 : unnecassary return deleted (#856) 2019-02-16 22:53:06 +02:00
eafe52e17a 756 : faq added (#855) 2019-02-15 20:00:21 +02:00
5251ec4a93 removed unnecessary static modifier on enum definition (#853) 2019-02-15 19:55:23 +02:00
26f1a608ab Update license headers 2019-02-13 23:14:53 +02:00
7a25c57474 Master worker pattern #799 (#831)
* master worker pattern

* Update App.java

* Adding new line to README.md

* Adding new line to pom.xml

* Adding new line to ArrayEquality.java

* Adding new line to Input.java

* Adding new line to Result.java

* Adding new line to ArrayTransposeMasterWorker.java

* Adding new line to ArrayTransposeMaster.java

* Adding new line to ArrayTransposeWorker.java

* Adding new line to Worker.java

* Adding new line to ArrayInputTest.java

* Adding new line ArrayTransposeMasterWorkerTest.java

* Adding new line to ArrayResult.java

* Review changes

* Update README.md
2019-02-13 23:04:16 +02:00
55c7579983 Fix script blocking (#843) 2019-02-04 08:35:06 +02:00
10cb191533 Retry exponential backoff #775 (#829)
* Spatial partition

* Retry with exponential backoff

* retry exponential backoff

* branch error
2019-02-04 08:27:13 +02:00
a6749cb63e Spatial partition pattern #562 (#828)
* Spatial partition

* Update pom.xml

* Update Bubble.java - pmd

* Update Rect.java - pmd
2018-12-22 23:37:31 +02:00
7b8c9b07ed Fix typo (#832) 2018-12-17 12:12:54 +05:30
0fa18d91c6 Added real world example of Command pattern
JUnit 4 Statement class is also an example of Command pattern. Added that to list of real world examples
2018-12-03 18:58:20 +05:30
53b673d5b0 No Need declare App class as a utility class (#827) 2018-11-25 19:35:22 +02:00
966c56311c Update Readme.md (#815)
Added a tutorial link for  intercepting filter design pattern
2018-11-04 20:12:04 +02:00
150f72758e Add missing license headers 2018-11-03 09:13:59 +02:00
4446e74338 Hexagonal pattern fixes (#814)
* Fixed wrong else condition

* Simplified creating Set of numbers

* Deleted unused imports

* Replaced 'for' loop with 'foreach' one

* Replaced explicit type with diamond

* Removed unnecesary brackets from lambda

* Removed unnecesary contains check before adding element to Set

* Fixed typo and changed non-english constant names
2018-10-27 16:39:16 +05:30
70f6e54353 Fix blocker issues on Sonar #508 (#810)
* Fix blocker issues on Sonar

* Replace Assertj assertions with JUnit ones
2018-10-25 18:43:58 +05:30
1f1fcae513 Refactor Page-object pattern (#812)
* Refactor : create 2 sub-modules for page-object pattern

* Replace e.printStrackTrace with logger
2018-10-24 23:17:46 +03:00
2aa9e78ddd Minor refactorings and code style changes (#807)
* Made minor changes in some patterns such as removed throws clause where not needed, changed incorrect order of arguments in assertEquals

* Minor refactorings and code style changes. 1) Removed several use of raw types 2) Removed unnecessary throws clauses 3) Used lambda expressions wherever applicable 4) Used apt assertion methods for readability 5) Use of try with resources wherever applicable 6) Corrected incorrect order of assertXXX arguments

* Removed unused import from Promise

* Addressed review comments

* Addressed checkstyle issue
2018-10-23 13:45:41 +05:30
25ed7c09c5 Refactored Event Queue (#806)
* 1) Test cases were not stopping AudioService before ending test case 2) Changed Audio to be a good singleton, previously because of Audio being bad singleton, test cases which were using static methods could have caused intermittent failures. 3) Made some other refactorings as well

* Removed sonar issue and converted Audio to eager singleton for simplicity

* Updated class diagram PNG
2018-10-21 21:15:33 +03:00
922fd62da6 Resolves #643, test cases failed due to global state in CallsCount (#803)
* Resolves #643, test cases failed due to presence of global state in CallsCount. Because AppTest was executed before B2BServiceTest, it scheduled 1 sec timer using ThrottleTimerImpl class. While resetting it used that global CallCount class reset() method, which reset all counters. So that causes thread safety issue because of unintended sharing of application state between test cases, which is not a good practice.

* Updated class diagram png and added UCLS file
2018-10-21 21:14:07 +03:00
9e7a500743 Refactoring changes in Ambassador Pattern (#805)
* 1) Updated test cases to use Junit Assert method as compared to assert keyword 2) Proper testing of RemoteService using RandomProvider interface. Introduced RandomProvider interface so that randomness can be controlled from test cases. 3) For readability used constant for representing FAILURE

* Addressing review comments, Deleting unintentional file and used FAILURE constant in ClientTest as well
2018-10-21 21:12:03 +03:00
21a149ee77 Merge pull request #801 from iluwatar/HexagonalRefactoring
Minor refactorings in Hexagonal architecture
2018-10-21 09:54:28 +03:00
f5eaf06c1c Merge pull request #802 from iluwatar/Issue#699
Resolves #699 Intermittent failure was due to Thread.sleep in the code
2018-10-21 09:25:06 +03:00
3c6fb0c53b Merge pull request #800 from trumvekhuya/master
Fix small points in Strategy and Decorator pattern.
2018-10-21 08:46:24 +03:00
829df031c3 Intermittent failure was due to Thread.sleep in the code. While performing unit test cases there was race condition between two threads, so it was not guaranteed to work every time. Used an interface DelayProvider for simulating delay, and while unit testing fake delay provider is used that eradicates the use of Threads in unit test cases, which is not a good practice. 2018-10-15 16:36:27 +05:30
37ae182630 Resolved PMD issues 2018-10-15 13:30:20 +05:30
ab2c12e734 1) Refactored LotteryNumbers to use Joiner from guava library to join lottery numbers. 2) Solved potential thread safety issue in LotteryTicketId class, where it was using raw primitive value and incrementing it which is not thread-safe. So used AtomicInteger for brevity 3) assertEquals arguments were in incorrect order at many places, so changed order of those 4) Replaced assertFalse and assertTrue at some places with assertEquals and assertNotEquals for reducing complexity of code 5) Removed public modifiers from test cases, as they are no more needed by JUnit 5 2018-10-15 13:21:00 +05:30
b3f0cc7e00 - Assign ClubberTroll to another variable in README 2018-10-15 11:52:56 +07:00
86e9c66ca5 - Assign new clubberTroll instance to another variable.
- Remove redundant Exception from throws list in unit tests.
2018-10-15 11:41:14 +07:00
a6e6c22bf6 Remove redundant Exception from throws list in DragonSlayerTest 2018-10-15 10:44:14 +07:00
db33cc533b Remove CII best practices badge 2018-10-13 18:40:10 +03:00
8433c7b712 Merge pull request #793 from andrievsky/master
Fix redundant list alloc in LotteryNumbers
2018-10-13 18:28:40 +03:00
ee74fec53c Fix pattern title 2018-09-30 21:36:32 +03:00
7a7e891384 Set version for next development iteration 2018-09-30 21:05:57 +03:00
26d6d96f78 Reach milestone 1.20.0 2018-09-30 21:03:48 +03:00
3cec7a9ec1 Merge pull request #796 from LyndonArmitage/module-ignore-test-output
Delete & Ignore output.txt & error.txt
2018-09-25 22:49:25 +03:00
b079aec1fd Merge pull request #794 from iluwatar/Issue781
#781 Resolved ClasscastException from Acyclic Visitor
2018-09-25 22:45:25 +03:00
8f53df91b9 Delete & Ignore output.txt & error.txt
Both output.txt and error.txt are produced by tests.
Each file contained a header that was overridden upon executing said
tests causing tracked files to be changed.

Added them to a local .gitignore file for this module.
2018-09-24 10:08:02 +01:00
709405d964 Resolved checkstyle issues 2018-09-11 16:11:59 +05:30
f3749a2b9d Solved the classcast exception and used instanceof instead. Improved javadocs a bit. 2018-09-11 15:58:14 +05:30
1d12d94bac Fix redundant list alloc in LotteryNumbers 2018-09-11 11:55:53 +02:00
9e56e5cbc1 Merge pull request #791 from er2/executeAroundLambda
Execute Around - use lambda
2018-09-09 00:24:42 +05:30
1698b066f3 Merge pull request #767 from nikhilbarar/collection-pipeline
#564: Collection Pipeline pattern
2018-09-09 00:21:45 +05:30
4ed039d807 Updated UCLS file and PNG image 2018-09-08 20:38:04 +05:30
ec6d2a8ebe execute around lambda 2018-09-07 22:29:51 -04:00
98c3f93e82 Review changes in Test Cases 2018-09-04 20:52:11 +05:30
26fbbed62e Typo in Readme 2018-09-01 15:48:36 +05:30
0f9089dd62 Typo in Readme 2018-09-01 15:48:07 +05:30
038befea26 Merge pull request #779 from mitchellirvin/bst-iterator
#778: Binary Search Tree Iterator
2018-08-30 12:46:13 +05:30
9daa3140e4 Category Enum for category of Car 2018-08-29 22:02:17 +05:30
8458e426bc correcting raw types for the item Iterator. 2018-08-29 07:36:52 -04:00
e6f84f2f41 modified return type of TreasureChestItemIterator's constructor to be Iterator 2018-08-28 07:46:02 -04:00
74f3799eb4 Merge pull request #788 from diffblue-assistant/finallyclosetotrywithresources
Use try-with-resources
2018-08-28 13:17:16 +05:30
b23d8430af Added Missing class 2018-08-26 23:31:03 +05:30
cb6b0b3600 Checkstyle Fixes 2018-08-26 23:21:25 +05:30
cd44ef3c81 Review Changes 2018-08-26 23:12:33 +05:30
1c2ddfad54 Refactored App.java to remove duplicate code and elegantly demonstrate each implementation of the Iterator interface. Removed the redundant ItemIterator interface. Added insert() method to TreeNode class to allow for more elegant construction of BSTs. 2018-08-25 18:49:43 -04:00
f36de036f6 Use try-with-resources
Replace try statements that close a resource in the finally block with a
try-with-resources statement [1].

This commit was created automatically by Diffblue refactorings (https://www.diffblue.com/).

[1] https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html
2018-08-23 13:44:55 +01:00
b64262303a Merge pull request #787 from bordoisila1/checkstyle-minor-updates
Fixed minor changes suggested by Checkstyle
2018-08-21 11:20:16 +05:30
9d012772fd Merge pull request #785 from sgyyz/fix-image-name
Fix converter image Display Issue
2018-08-21 11:12:40 +05:30
e1a2f141c5 Fixed minor changes suggested by Checkstyle 2018-08-20 22:36:58 -04:00
cce104a271 Fix converter image issue 2018-08-20 21:14:16 +08:00
16df157181 Add license headers 2018-08-13 08:13:06 +03:00
c34004bea5 Merge pull request #763 from 7agustibm/master
First proposal for #586 Hexagonal Architecture primary ports should have interfaces
2018-08-10 22:42:09 +03:00
3e0cfa5684 #778 Implemented BSTIterator. Included comprehensive unit and integration tests. Refactored file structure to be friendly to future contributors with iterators of more data structures. Added JUnitPlatform to enable running test suite across all iterator implementations. Added README to /binarysearchtree to document what it does and how it works. 2018-08-04 21:59:53 -04:00
ce459e8f9f Merge branch 'master' into collection-pipeline
# Conflicts:
#	pom.xml
2018-08-02 02:43:47 +05:30
535431fac1 Merge branch 'master' of https://github.com/iluwatar/java-design-patterns 2018-08-02 02:30:08 +05:30
facb9e51a6 Merge pull request #774 from zenuo/master
Add an 'Override' annotaion
2018-08-01 16:02:23 +03:00
9eb8c30bcb Add Annotation 'Override' to com.iluwatar.reactor.app.AppClient.TcpLoggingClient.run method. 2018-07-18 17:06:19 +08:00
fc87f8b7d3 Merge branch 'master' of https://github.com/iluwatar/java-design-patterns
# Conflicts:
#	pom.xml
2018-07-08 23:09:55 +05:30
b453753790 Fix import not used 2018-07-08 19:38:54 +02:00
d2b900b524 Fix checkstyle & update interface services 2018-07-08 19:25:42 +02:00
2c8d1744df #564: Collection Pipeline pattern 2018-07-08 21:37:30 +05:30
d915b66e70 Merge pull request #755 from okinskas/ambassador
Ambassador Pattern #722
2018-07-08 09:55:36 +03:00
328f917749 #564: Collection Pipeline pattern 2018-07-02 00:42:04 +05:30
ae07423470 First proposal 2018-07-01 16:29:07 +02:00
7add7b833c Merge branch 'master' into ambassador 2018-06-29 14:34:31 +01:00
c7f9266768 Merge pull request #753 from Argyro-Sioziou/master
Acyclic Visitor pattern #734
2018-06-28 13:55:32 +05:30
0453bf9063 General cleanup. Simplifying code. Replacing all prints with appropriate Logger. 2018-06-23 13:24:07 +01:00
f9bdd58bb7 Merge remote-tracking branch 'upstream/master' 2018-06-14 18:34:27 +03:00
57f60c5ebf Updating javadoc comments 2018-06-14 18:30:46 +03:00
51659fe9c5 Updating HayesVisitor and ZoomVisitor 2018-06-14 18:04:30 +03:00
04d80f05c8 Adding consequences in README.md 2018-06-14 17:56:14 +03:00
6636fb151b Adding AllModemVisitor interface 2018-06-14 12:40:41 +03:00
6a0fa747ad Fixing typos 2018-06-14 12:18:46 +03:00
8b1ed95d6b Updating ConfigureForDosVisitorTest and ConfigureForUnixVisitorTest classes 2018-06-14 12:14:35 +03:00
6167d06dce Removing test case 2018-06-14 12:02:34 +03:00
49feead13f Removing interfaces' test classes 2018-06-14 11:59:02 +03:00
179a02bcdd Removing default constructors 2018-06-14 11:52:23 +03:00
71f61cd40e #466, #509: Added diagrams and Readme files 2018-06-13 23:40:36 +05:30
d54e29051f #466: Fix Checkstyle Issues 2018-06-13 02:54:09 +05:30
4456a440bc Monitor Object pattern #466 2018-06-13 02:43:25 +05:30
c48a1e9193 #509: Checkstyle Fixes 2018-06-11 01:56:32 +05:30
971a74e13a #509: Component Object Pattern 2018-06-11 00:38:03 +05:30
868e4561b5 Updating pom dependencies and adding license. 2018-06-05 21:16:16 +01:00
c4dd94a019 Fixing CheckStyle issues in Test classes. 2018-06-05 07:32:29 +01:00
ff579fabcf Fixing CheckStyle issues. 2018-06-04 22:50:59 +01:00
5393c96247 Adding README.md 2018-06-04 22:32:05 +01:00
bae51f5803 Adding license to test classes. 2018-06-04 21:27:04 +01:00
74190e36bb Adding tests for each class. 2018-06-04 21:20:04 +01:00
6b10f4bdd1 Adding appropriate comments on classes and full description in App.java. Removing added function in ServiceAmbassador as it's not appropriate for the example. 2018-06-04 20:36:10 +01:00
73925cef2e Ambassador adds logging, imitates trying to connect to remote service and provides new client-side functionality. Need to clean up code, add tests and add descriptive comments. 2018-06-03 22:20:40 +01:00
987994f0fe Add license headers 2018-06-03 14:15:11 +03:00
95df47e418 Disable intermittently failing test 2018-06-03 14:15:00 +03:00
afe85e22e7 Enhancing code format 2018-05-29 01:37:53 +03:00
4023944240 Adding README.md file 2018-05-27 17:10:20 +03:00
17164c282a Adding class diagram 2018-05-27 17:07:34 +03:00
27f58e0925 Adding HayesTest and ZoomTest 2018-05-27 17:04:22 +03:00
36a14778dc Adding App class 2018-05-27 17:02:56 +03:00
5e1da6361f Adding ConfigureForDosVisitor and ConfigureForUnixVisitor 2018-05-27 16:58:38 +03:00
97718846d1 Adding HayesVisitor and ZoomVisitor 2018-05-27 16:55:08 +03:00
bbdf1cd738 Adding Hayes and Zoom classes 2018-05-27 16:51:26 +03:00
323395daaf Adding ModemVisitorTest 2018-05-27 16:49:05 +03:00
75734a6b7d Adding Modem abstract class 2018-05-27 16:45:43 +03:00
3f92b8f84e Adding ModemTest 2018-05-27 16:37:13 +03:00
18a75c0620 Adding ModemVisitor interface 2018-05-27 16:12:31 +03:00
9e15abbafc Adding pom.xml file 2018-05-27 15:49:35 +03:00
e9a219f643 Merge branch 'master' of https://github.com/Argyro-Sioziou/java-design-patterns into acyclic-visitor 2018-05-27 15:44:04 +03:00
8bf53fe91d Adding acyclic-visitor module in pom.xml 2018-05-27 15:11:06 +03:00
c713dbcbf4 Merge pull request #752 from christophercolumbusdog/master
#643 Fix flaky tests for throttling pattern
2018-05-27 10:59:52 +03:00
f3e1cd3a1d Fix checkstyle 2018-05-25 22:47:23 -05:00
4ab46c7fcb #643 Fix flaky tests for throttling pattern 2018-05-25 22:26:35 -05:00
d7893c1fc2 Updated incorrect tag
Corrected improper tag from Difficulty-Easy to Difficulty-Beginner
2018-05-16 12:36:17 +05:30
eddfe76a84 Merge pull request #717 from waisuan/master
Dirty Flag pattern #560
2018-05-16 12:31:20 +05:30
a386d4266d Fixed UnitTest 2018-05-12 18:18:44 +01:00
29edeabaae Fixes based on code review feedback 2018-05-12 17:47:03 +01:00
abcc39871b Merged with upstream 2018-05-12 16:12:23 +01:00
4ac6f90c96 Merge pull request #748 from pelmegov/clean-converter-class
Parameters in Converter class methods was renamed.
2018-04-29 10:39:51 +03:00
a8d89ca861 Parameters in Converter class methods was renamed. A base class must not contain the concrete entities names or concrete class names 2018-04-28 19:34:57 +03:00
998600f09e Merge pull request #744 from pokemon4e/master
Consistent naming for EIP patterns #733
2018-04-12 21:02:08 +03:00
1e04b17a2d Merge pull request #743 from MottoX/cleanup
Cleanup unnecessary code
2018-04-12 20:39:45 +03:00
187b16c9e0 Merge pull request #740 from mernst/coverage-documentation
Correct the command for computing code coverage
2018-04-12 20:37:30 +03:00
3b45f2cad6 Consistent naming for EIP patterns #733 2018-04-12 15:49:52 +03:00
65e1cae2de Cleanup unnecessary code 2018-04-11 16:11:37 +08:00
0b7343dd34 Correct the command for computing code coverage 2018-04-09 16:38:09 -07:00
379a825182 Merge pull request #714 from dheeraj-mummareddy/master
#473 serveless implementation using aws compute engine and serverless fram…
2018-04-08 20:01:42 +03:00
522fbc035f delete the incorrect package 2018-04-08 10:56:48 -04:00
40e5cc628a minor code review comments and Updating license header 2018-04-08 10:56:10 -04:00
7a13012855 Merge branch 'master' of github.com:iluwatar/java-design-patterns 2018-04-08 10:38:16 -04:00
1c0e0cd88b Set version for next development iteration 2018-03-31 10:36:05 +03:00
3407392664 Reach milestone 1.19.0 2018-03-31 10:34:25 +03:00
474c218f85 Update license headers 2018-03-31 10:25:58 +03:00
17ea0b17f6 Disable flaky tests mentioned in issue #643 and #699 2018-03-31 10:16:56 +03:00
7d4ccc6490 Merge pull request #730 from Deathnerd/master
Add Java annotation to code blocks in README files #728
2018-03-31 09:50:28 +03:00
8b06ea52ab Removed unnecessary changes outside of scope of the task 2018-03-28 01:41:43 -04:00
86ee59c232 Add Java annotation to code blocks in README files 2018-03-28 01:35:43 -04:00
6879990857 Merge pull request #726 from valery1707/patch-1
Update SonarCloud badge
2018-03-24 16:24:05 +02:00
855cf75dd6 Merge pull request #729 from S177LM/patch-1
Fixed typo
2018-03-22 17:38:32 +02:00
ecad864703 Fixed typo
Just fixed a little repetition in the javadoc comment.
2018-03-20 19:51:04 +01:00
c3b102e547 fixing the link 2018-03-14 19:22:39 -04:00
69be74c016 Update SonarCloud badge
Update link into badge URL as described in https://about.sonarcloud.io/news/2018/02/05/new-project-badges.html
2018-03-14 20:20:15 +03:00
3f9a5a254e code review comments 2018-03-13 12:03:23 -04:00
05a9c030c0 Merge branch 'master' of github.com:iluwatar/java-design-patterns 2018-03-12 09:19:55 -04:00
c723289bbb Merge pull request #723 from Juaanma/patch-1
Captain is implementing RowingBoat - Adapter pattern
2018-03-11 21:59:13 +02:00
477da92e2f Merge pull request #724 from anthonycampbell/master
My solution to issue #602.
2018-03-11 21:23:32 +02:00
ac57d67f45 solution to issue #602. Implemented multiton with enum, added example to app.java, a test for the enum, and commented my code 2018-03-08 16:08:09 -08:00
960d2ea6f7 solution to issue #602. Implemented multiton with enum, added example to app.java, a test for the enum, and commented my code 2018-03-08 15:52:35 -08:00
87cb33f69b Fixed tests 2018-03-07 17:43:03 -03:00
915a1f3eb0 Forgot to delete row's @Override
My bad, sorry. It should compile now.
2018-03-07 17:26:39 -03:00
c8fd0bc23d Merge pull request #716 from baislsl/javadoc-fix
Improve Javadoc
2018-03-07 21:52:50 +02:00
696ed86aff Captain is implementing RowingBoat - Adapter pattern
Captain and RowingBoat aren't interchangable. 
Captain, as a client, may have a method to use the boat, but it isn't needed that they share the same interface, as it makes the code more confusing.
2018-03-07 00:19:33 -03:00
e0b8f6f850 fix checkstyle 2018-03-06 16:09:22 +08:00
143213483c fixing typo 2018-03-05 21:41:24 -05:00
678fa93838 update readme and thanks to Amazon Web Services & cloud guru 2018-03-05 21:25:08 -05:00
b2607010b4 update readme and ready for review 2018-03-05 21:23:42 -05:00
b2dd36f607 adding backend as a service with lambda + api gateway + dynamodb 2018-03-05 20:51:32 -05:00
af6973884f merge from upstream and fixing conflicts 2018-03-04 17:46:29 -05:00
3894a0bb6c Merge branch 'master' of github.com:iluwatar/java-design-patterns 2018-03-04 17:33:58 -05:00
49f8434911 Merge branch 'master' of github.com:iluwatar/java-design-patterns 2018-03-04 17:33:27 -05:00
55bbb88ac9 Merge branch 'master' into master 2018-03-04 23:51:04 +08:00
ce88fd723e Merge branch 'master' of https://github.com/waisuan/java-design-patterns 2018-03-04 15:25:55 +00:00
e01d640499 Merge pull request #713 from baislsl/master
Use the @TestInstance annotation
2018-02-25 08:54:00 +02:00
7fef5e4cd5 Merge pull request #696 from besok/master
#677 add pattern Trampoline.
2018-02-25 08:45:36 +02:00
3333a2839b Remove unused var 2018-02-20 10:58:49 +00:00
a60fa76fd9 Add UML diagram 2018-02-20 10:35:06 +00:00
565f5a4e70 Add README.md 2018-02-20 09:48:44 +00:00
b73ef6e6c5 Dirty Flag pattern #560 2018-02-19 16:08:45 +00:00
991ba320a6 Improve Javadoc 2018-02-19 22:01:14 +08:00
d78434fed8 Merge pull request #644 from spanhal1/master
added tutorial links to bridge, decorator, abstract-factory, strategy…
2018-02-17 20:39:52 +02:00
f9f93695fe Merge pull request #609 from igorcadelima/master
Protect against instantiation via reflection
2018-02-17 20:36:40 +02:00
a367832d9e Merge pull request #711 from ryanguest/master
Fix typo
2018-02-17 20:26:26 +02:00
7a7ba871dc serveless implementation using aws compute engine and serverless framework 2018-02-08 12:03:00 -05:00
36f5947cd7 Use the @TestInstance annotation 2018-02-08 03:00:55 +08:00
f62ae456b0 Fix typo 2018-02-01 15:44:23 -08:00
5cbf651a3e Merge branch 'master' into master 2018-01-28 14:44:19 -05:00
e7b119c95c Merge pull request #709 from mookkiah/issue_508_prototype
issue 508 - using copy constructor to implement prototype.
2018-01-28 10:44:25 +02:00
ec28b1250d Merge pull request #708 from BeeHuang/fix-comment
Fix error comment with isServiceRunnign in Event Queue
2018-01-28 10:29:19 +02:00
2dcf63c646 fixed typo in abstract factory pattern 2018-01-27 20:30:15 -05:00
0805716515 issue 508 - using copy constructor to implement prototype.
As per http://www.artima.com/intv/bloch13.html, clone method in java is
broken or confusing. So staying away from clone method.
2018-01-27 09:57:15 -05:00
9f797b3009 fix error comment with isServiceRunnign 2018-01-27 16:44:23 +08:00
33a3d6fef4 Merge pull request #702 from zafarella/patch-4
Add thread safety comment on enum based singleton
2018-01-23 23:24:39 +02:00
dddfb52c70 Update EnumIvoryTower.java 2018-01-23 00:07:11 -05:00
9667878b5f add junit - jupiter -engine 2018-01-20 22:09:42 +03:00
4c4cbd41cf fix checkstyle errors 2018-01-20 21:42:14 +03:00
f7825f6c99 changes fixing mistakes 2018-01-20 13:36:43 +03:00
8960ef6111 Merge pull request #698 from olcbean/redundant_super
Remove redundant explicit super() constructor calls #694
2018-01-16 21:22:20 +02:00
a82000650d Remove redundant explicit super() constructor calls #694 2018-01-15 19:33:55 +01:00
e9021329e1 Merge pull request #697 from james-a-roland/issue_694
Removing all redundant super constructor calls, issue 694.
2018-01-13 22:25:31 +02:00
e9a541259b Removing all redundant super constructor calls 2018-01-10 21:20:37 -08:00
94fdefee3a add code 2018-01-08 14:45:38 +03:00
b61b64073a #677 init folder for pattern trampoline 2018-01-08 14:00:12 +03:00
09c0891948 Merge pull request #693 from jujis008/master
fixed issue #681
2018-01-08 07:55:39 +02:00
90570f809b rename png file and changes for README.md 2018-01-08 11:09:04 +08:00
55be744c4a #674 update SonarQube badge URL and link 2018-01-07 21:34:15 +02:00
c34975bdff #674 update SonarQube analysis URL 2018-01-07 21:25:00 +02:00
ed37d5cdc7 regenerate UML diagram 2018-01-07 12:26:58 +08:00
f87754917c Merge pull request #690 from amogozov/master
Cleanup commented code
2018-01-02 19:29:14 +02:00
e046007db7 fixed issue #681 2018-01-02 18:23:11 +08:00
0306161380 Cleanup commented code 2018-01-02 09:24:18 +09:00
dea2316f1f Set version for next development iteration 2018-01-01 16:58:29 +02:00
cb38501ea2 Reach milestone 1.18.0 2018-01-01 16:50:05 +02:00
7f959ed157 Merge pull request #689 from amogozov/junit5-migration
Migrate to JUnit5
2018-01-01 16:42:47 +02:00
6694d742a3 Migrate to JUnit5 2017-12-31 16:29:48 +09:00
a20e54d0a7 Fix Retry pattern categories and tags 2017-12-30 10:46:14 +02:00
e8496c5d48 Merge pull request #688 from ThatGuyWithTheHat/master
Event-Asynchronous Class Diagram Corrected.
2017-12-30 10:39:16 +02:00
3defc1b36a Merge remote-tracking branch 'upstream/master' 2017-12-30 08:13:33 -06:00
9677cc4eea Pattern push 2017-12-30 08:10:42 -06:00
fc690869db I messed up the file format. This is the correct version. 2017-12-30 07:42:33 -06:00
37c9b922a7 Corrected Event Asynchonous Class Diagram
Lots of issues but I think this finally has it sorted out!
2017-12-30 07:40:23 -06:00
0824529471 Merge pull request #684 from llorllale/master
#451 Retry pattern
2017-12-30 09:53:28 +02:00
235fe6a7ca DIIIIEEE 2017-12-30 01:32:05 -06:00
5373214b70 Why doesn't this go away? 2017-12-30 01:31:37 -06:00
93c54a2ee5 Try 2 2017-12-30 07:27:29 -06:00
5a930f6a26 new Event Asynchronous file. This one works I hope. 2017-12-30 07:25:22 -06:00
2a4edad23a (FIX) Deleted unused files accidentally added in last commit 2017-12-29 09:42:32 -04:00
c1ea04e002 Upon reviewer's request:
(FIX) Deleted .puml file (no longer required or used)
(FIX) Removed @since annotations (they add noise)
2017-12-29 09:35:57 -04:00
10c0879d3b (FIX) Upgrade all @since versions to 1.18.0 following the
parent pom's version update
2017-12-27 16:09:34 -04:00
620f408688 (FIX) Parent pom version 2017-12-27 16:06:26 -04:00
2456b9f4b0 (FIX) The 'retry' module was not added to the module list in parent pom 2017-12-27 15:46:46 -04:00
144db43ad4 Merge branch 'master' of https://github.com/iluwatar/java-design-patterns 2017-12-27 15:22:02 -04:00
f7c396b0fd (NEW) Module "retry"
(NEW) Illustrative classes:
      - App: simulates a production application
      - BusinessOperation<T>: abstraction over any operation that can
        potentially fail
      - FindCustomer <: BusinessOperation<String>: illustrative
        operation that can throw an error
      - Retry <: BusinessOperation<T>: transparently implements the
        retry mechanism
      - Several "business" exceptions:
        - BusinessException: top-level
        - CustomerNotFoundException: can be ignored
        - DatabaseNotAvailableException: fatal error
(NEW) .puml and .png for UML
2017-12-27 15:15:04 -04:00
6b4ae0d0b1 Merge pull request #682 from zafarella/patch-3
add CII Best Practices badge
2017-12-26 18:28:20 +02:00
04f2be64c6 Update README.md
add CII Best Practices badge
2017-12-25 08:52:52 -05:00
6c4de3bcef Fix some tags and categories 2017-12-25 11:30:24 +02:00
a2d155cbb9 Merge pull request #680 from fanofxiaofeng/patch-3
replace 'a' with 'an'
2017-12-15 21:27:11 +02:00
52f09d043c Merge pull request #679 from fanofxiaofeng/patch-2
fix typo
2017-12-15 21:26:32 +02:00
11de22bf4a Merge pull request #678 from Tschis/presentations
Add presentation for Command and Factory Method
2017-12-15 21:25:49 +02:00
6614d0735e Merge pull request #671 from zafarella/patch-2
Create PULL_REQUEST_TEMPLATE.md
2017-12-15 21:24:00 +02:00
8312e09f6e replace 'a' with 'an'
[A or An](https://www.a-or-an.com/a_an/axe)
2017-12-14 16:15:02 +08:00
176bb85f40 fix typo
'exepcted'->'expected'
'expectedVisibilty'->'expectedVisibility'
2017-12-12 20:40:16 +08:00
7e7a0c83f5 Update readme with presentation link 2017-12-11 13:48:29 -03:00
4dbf646b37 Add Command presentation 2017-12-11 13:45:10 -03:00
506d316529 Add Factory Method presentation 2017-12-11 11:45:32 -03:00
8a9162f542 Update PULL_REQUEST_TEMPLATE.md 2017-12-09 16:25:27 -05:00
4b1650fbde Merge pull request #676 from Tschis/master
Add presentation for Abstract Factory
2017-12-09 22:38:28 +02:00
d26f2620ec Merge pull request #668 from Krandelbord/master
added synchronized keyword to method that reads from server poll
2017-12-09 22:29:40 +02:00
fb5c2a0324 Merge pull request #642 from piyushchaudhari04/unit-of-work-pattern
#352 - Unit of work pattern implementation
2017-12-04 00:32:49 +05:30
7cf897a051 Add presentation for Abstract Factory 2017-11-30 15:15:10 -03:00
171c4b30b9 #190 Remove puml posting script 2017-11-28 21:30:45 +02:00
bf98299db2 #190 Remove pumlids from readmes 2017-11-28 21:28:53 +02:00
b0f9582824 #190 Remove urm plugin 2017-11-28 20:55:52 +02:00
fb64d69347 Create PULL_REQUEST_TEMPLATE.md 2017-11-25 00:03:34 -05:00
4450000a83 Merge pull request #665 from Tschis/master
(Abstract Factory) Add factory of factories
2017-11-20 16:26:44 +02:00
14279278cd Sync readme.md with the new code 2017-11-19 19:22:03 -02:00
071cde8d70 Add license headers 2017-11-19 20:17:57 +02:00
6339e26838 Merge pull request #663 from codinghog/master
#114 Added eip-aggregator
2017-11-19 19:43:21 +02:00
5c953d7d00 added synchronized keyword to method that reads from server poll 2017-11-19 12:01:39 +01:00
51096ec445 #352- Unit Of Work : Update java doc for methods. 2017-11-12 15:50:12 +05:30
f3f1f54ccc #352- Unit Of Work : Update parent module version in unit of work module. 2017-11-12 15:19:49 +05:30
f58256d70a #352- Unit Of Work : Updated applicability of pattern in README. 2017-11-12 15:09:47 +05:30
933c84ff1c Fix checkstyle validations 2017-11-07 22:32:36 -03:00
3634b3338c Fix checkstyle validations 2017-11-07 22:19:10 -03:00
d37922bf82 add factory of factories 2017-11-07 21:05:04 -03:00
87ee97a112 #114 Fixed checkstyle issue 2017-11-07 07:37:12 +01:00
c45e9a1faf #114 Fixed checkstyle issue 2017-11-07 07:24:31 +01:00
390c33e36e Merge pull request #661 from hukacode/patch-1
Fix typo
2017-11-05 09:59:14 +02:00
5f90b2597a Merge pull request #659 from pechenoha/master
Fix a typo in the "Facade" pattern
2017-11-05 09:51:40 +02:00
6e0bf59e5a #114 Aggregator pattern; tests; description 2017-11-04 22:38:51 +01:00
7185830700 Merge branch 'unit-of-work-pattern' of github.com:piyushchaudhari04/java-design-patterns into unit-of-work-pattern 2017-10-31 16:31:01 +05:30
ec6eea61a5 #352- Unit Of Work : Updated applicability of pattern in README. 2017-10-31 16:26:24 +05:30
89bfaf876e Fix typo 2017-10-31 17:32:11 +07:00
e289779dd3 Fix a typo 2017-10-30 19:54:31 +02:00
a2a13758e0 Merge branch 'master' of https://github.com/iluwatar/java-design-patterns 2017-10-28 22:27:34 +02:00
5ed46c2c64 Merge pull request #656 from bjurga/bjurga-App.java-patch
Use UserConverter instead of rewriting its ctor
2017-10-22 22:21:54 +03:00
168c9cf3a9 Merge pull request #655 from codinghog/master
#173 Added new pattern - EIP Splitter
2017-10-22 22:17:51 +03:00
0312392b3c Merge pull request #654 from fanofxiaofeng/patch-1
maybe it should be "Let's" here
2017-10-22 22:14:37 +03:00
df04e19994 Use UserConverter instead of rewriting its ctor 2017-10-20 13:59:42 +02:00
8c15b89295 Merge branch 'master' into unit-of-work-pattern 2017-10-19 13:03:16 +05:30
eeaf7e4b7c Merge branch 'master' of https://github.com/iluwatar/java-design-patterns 2017-10-17 12:46:54 +02:00
dd828bcd6c #173 Update pom 2017-10-17 12:46:28 +02:00
0aa84e37f2 #173 Pattern description 2017-10-17 12:42:41 +02:00
767f41ad90 #173 Removed unneeded dependencies 2017-10-17 00:12:41 +02:00
9c7ee5ed1d #173 Added new pattern, tests 2017-10-16 19:33:15 +02:00
141d448c17 maybe it should be "Let's" here 2017-10-16 15:37:13 +08:00
41710cbe9e Merge pull request #651 from codinghog/master
#176 Added new pattern - EIP Wire Tap
2017-10-16 08:24:46 +03:00
04dd93f8bc Merge branch 'master' of https://github.com/iluwatar/java-design-patterns 2017-10-15 18:45:36 +02:00
624a4ef857 #176 Fixed CheckStyle issue 2017-10-13 14:22:48 +02:00
0453ba1315 #176 Test run, app shutdown, minor refactoring 2017-10-13 14:02:03 +02:00
60f07d1940 Added test class for App 2017-10-12 17:33:03 +02:00
dfb43299a8 Merge pull request #652 from yosfik/master
Fix FactoryMethodTest and PrototypeTest
2017-10-12 17:13:57 +03:00
b2dd175851 Merge pull request #648 from Peter-Morawski/patch-1
added missing whitespace to the elements of the unordered list
2017-10-09 11:00:43 +05:30
31120a8fa0 Merge pull request #646 from rastdeepanshu/master
Modifications for intermittent test failure in Throttling pattern.
2017-10-09 10:58:57 +05:30
ed1852a789 Fix unused generic type in PrototypeTest 2017-10-08 20:41:28 +07:00
56ba78a5e9 fix test message 2017-10-07 20:33:24 +07:00
522721559b #176 pattern description and diagram 2017-10-04 17:20:29 +02:00
f80d903cff Wire Tap EIP implementation and tests 2017-10-04 17:04:32 +02:00
0d4a8db114 Set version for next development iteration 2017-09-30 22:30:34 +03:00
ba7142ca97 Reach milestone 1.17.0 2017-09-30 22:26:44 +03:00
4e236f6da8 Minor modification of Long to long 2017-09-28 15:04:32 +02:00
2f33094030 Merge pull request #645 from amitdash291/patch-1
Removed redundant times(1) params for verify()
2017-09-27 10:18:46 +05:30
4abef6da33 added missing whitespace to the elements of the unordered list 2017-09-26 20:51:32 +02:00
b5eca2f856 #352- Unit Of Work : Updated applicability of pattern in README. 2017-09-27 00:04:06 +05:30
b8491436dd #352- Unit Of Work : modified readme. 2017-09-26 23:25:36 +05:30
193879dff6 Merge pull request #641 from dosdebug/fix_command_pattern
Removes unused size and visibility enumerations
2017-09-26 07:35:42 +03:00
04891e5bf3 Merge branch 'unit-of-work-pattern' of github.com:piyushchaudhari04/java-design-patterns into unit-of-work-pattern 2017-09-26 00:07:03 +05:30
244e9c7caa #352- Unit Of Work : modified readme. 2017-09-25 21:23:12 +05:30
01b85b9721 Used AtomicLong for concurrenthashmap operations 2017-09-25 12:59:39 +02:00
e6342d5956 Merge pull request #1 from iluwatar/master
upstream update
2017-09-24 21:55:34 +02:00
6848dd020e Merge branch 'master' of https://github.com/iluwatar/java-design-patterns 2017-09-24 19:36:27 +03:00
7db7df38fd Fix error in Checkstyle rule definition 2017-09-24 19:36:15 +03:00
aa1f57a253 Merge pull request #640 from dosdebug/master
Fixes Checkstyle problems
2017-09-24 19:35:24 +03:00
683b45d1b0 Merge pull request #639 from reegnz/fix_naked_objects_url
Fix naked objects thesis url
2017-09-24 19:04:00 +03:00
e80677b1f3 Merge pull request #634 from mookkiah/issue_587_promise
#587SonarQube reports bugs in promise module
2017-09-24 18:42:36 +03:00
e4b0153ddc Merge branch 'master' into unit-of-work-pattern 2017-09-24 13:47:40 +05:30
a2a08a3a3e Removed redundant times(1) params for verify() 2017-09-24 13:15:42 +05:30
8e73728fde #352- Unit Of Work : modified readme. 2017-09-24 12:56:06 +05:30
684cad9beb added tutorial links to bridge, decorator, abstract-factory, strategy and template method patterns 2017-09-23 20:55:38 -04:00
fb4c0f77e5 #631 Add missing license header 2017-09-23 09:39:13 +03:00
99de0e1644 Merge pull request #636 from gopinath-langote/partial-response-pattern
#631 - Partial response pattern Implementation
2017-09-23 09:35:35 +03:00
dba2d8aef7 #631 - Partial Response : [Refactor] Inline object creation. 2017-09-23 01:03:16 +05:30
a1ee8859d6 #352- Unit Of Work : Update puml diagram. 2017-09-23 00:53:45 +05:30
677f020813 #352- Unit Of Work : Add class diagram. 2017-09-23 00:49:01 +05:30
00dcf24e16 #352- Unit Of Work : Update licence. 2017-09-23 00:34:45 +05:30
1fb0525c6e #352- Unit Of Work : Remove affected lines. 2017-09-23 00:30:18 +05:30
633d3a97a0 #352- Unit Of Work : Add AppTest 2017-09-23 00:18:06 +05:30
9ee2255c1f #352- Unit Of Work : [Refactor] Rename main class to App 2017-09-23 00:15:32 +05:30
bf700fd995 #352- Unit Of Work : Make final instance variable of immutable Student class. 2017-09-23 00:14:13 +05:30
06b5c671f5 #631 - Partial Response : Modify AppTest. 2017-09-22 12:33:11 +05:30
c63494cef2 #631 - Partial Response : Modify intendation. 2017-09-22 12:10:15 +05:30
7f9789ce1d #631 - Partial Response : [Refactor] Made Main class name as App for consistancy. 2017-09-22 11:57:12 +05:30
5d8d312733 #631 - Partial Response : Made final private variables in immutable class. 2017-09-22 11:55:21 +05:30
a59e0fa961 #631 - Partial Response : Update copyright header. 2017-09-22 11:53:26 +05:30
c9f4048301 Removes unused size and visibility enumerations 2017-09-21 20:10:12 +05:00
d8ac00536c Fixes Checkstyle problems
There are few checkstyles problems found in the  which are required to be fixed
2017-09-21 15:13:57 +05:00
eb36033b83 #590 Add explanation for Chain of Responsibility 2017-09-19 23:20:40 +03:00
acaccc1c53 Fix naked objects thesis url
The commit fixes the URL, changing from a non-working URL to an actually
working one.
The URL was copied from the wikipedia page for Naked Objects.
2017-09-19 19:59:52 +02:00
1dc143abca #352- Unit Of Work : Update puml diagram. 2017-09-19 22:49:09 +05:30
530b9e9662 #352- Unit Of Work : added the readme file 2017-09-19 20:39:48 +05:30
06ba337b90 #631 - Partial Response : Add class diagram 2017-09-19 19:00:19 +05:30
1b0f55c3eb Merge pull request #633 from mookkiah/issue_587_da0_2
#587 SonarQube reports bugs in dao module
2017-09-19 08:48:23 +03:00
2c9098aecc #352- Unit Of Work : added the launching point of the module 2017-09-18 22:31:13 +05:30
5fe9d2be6c #352- Unit Of Work : [Refactor] Change module name to unit-of-work. 2017-09-16 21:39:26 +05:30
68ed2a4726 #352- Unit Of Work : Impement unit of work contract. 2017-09-16 21:35:27 +05:30
acc2fad818 #352- Unit Of Work : Added commit contract in Unit of work. 2017-09-16 18:43:35 +05:30
8a53a2626e #352- Unit Of Work : Unit of work contract. 2017-09-16 18:38:48 +05:30
e43b6f13fd #352- Unit Of Work : Add Student model and puml diagram 2017-09-16 18:11:00 +05:30
4ecc337c7d #352- Unit Of Work : Added module to project. 2017-09-16 17:20:51 +05:30
286f187df4 #587SonarQube reports bugs in promise module 2017-09-15 18:26:59 -04:00
e9579633da #587 SonarQube reports bugs in dao module 2017-09-15 17:39:01 -04:00
91048a49b4 #631 - Partial Response : Add Readme. 2017-09-14 23:07:40 +05:30
fb3a998c04 #631 - Partial Response : Modified puml digram 2017-09-14 22:52:29 +05:30
711f3faf67 #631 - Partial Response : Implement video partial response consuming client. 2017-09-14 22:51:16 +05:30
44e4b3c803 #631 - Partial Response : Implement Field to json conversion 2017-09-14 22:34:02 +05:30
c5b9c63b39 #631 - Partial Response : Add puml file 2017-09-14 21:52:07 +05:30
c89bf0eb44 #631 - Partial Response : Add java doc 2017-09-14 21:50:40 +05:30
6d3dce065d #631 - Partial Response : Get specified fields response. 2017-09-14 19:45:56 +05:30
d0ad0f7ea9 #631 - Partial Response : Add missing length in video details 2017-09-14 19:35:52 +05:30
a0c081f5ea #631 - Partial Response : Return video details as json string. 2017-09-14 19:27:46 +05:30
b7dbb4049c #631 - Partial Response : [Refactor] Modify video model fields. 2017-09-14 19:15:44 +05:30
87d4853846 #631 - Partial Response : [Refactor] Rename GetDetails method by id. 2017-09-14 18:47:46 +05:30
5836fdb54b Merge pull request #632 from OCNYang/master
Delete duplicate declared objects:ClubbedTroll
2017-09-14 08:10:41 +03:00
f38119c565 #631 - Partial Response : Get video details by id. 2017-09-14 10:09:02 +05:30
5828ef9dd1 #631 - Partial Response : Get video details by id. 2017-09-14 10:08:56 +05:30
6a560f7d15 Delete duplicate declared objects:ClubbedTroll
Trolls should not be re-declared: if I had a troll called Zac, one day I
gave him a weapon.I can not because he now has a weapon called him
Trundle. He is still Zac.
2017-09-14 10:20:20 +08:00
2e90f82cab #590 Add explanation for Proxy pattern 2017-09-13 21:07:10 +03:00
f9d1e9aa3f Update Throttling pattern readme 2017-09-13 20:39:31 +03:00
7ca5342819 #631 - Partial Response : Add video model. 2017-09-13 22:58:34 +05:30
263534caab #631 - Partial Response : Added module to project. 2017-09-13 22:34:26 +05:30
8652d0d32b Merge remote-tracking branch 'upstream/master' 2017-09-13 22:15:26 +05:30
a8f2e70e0a Alter Throttling pattern display name 2017-09-13 08:22:29 +03:00
4e290416df Merge pull request #629 from rastdeepanshu/throttling-pattern
Throttling pattern
2017-09-11 22:30:11 +03:00
565d5a0129 Merge remote-tracking branch 'upstream/master' 2017-09-11 01:16:32 +05:30
50d7dbe4de Seperated timer class and created Callscount class 2017-09-08 16:15:31 +02:00
5f9100cd03 Adding class diag and updating readme 2017-09-07 15:27:18 +02:00
2cf773e550 Adding etc with ucls and puml 2017-09-07 15:14:17 +02:00
05629f687b Adding throttling pattern 2017-09-07 12:54:19 +02:00
c13661810e #590 Add explanation for Flyweight 2017-09-06 22:31:21 +03:00
bd4247e864 #590 Add explanation for Facade pattern 2017-09-05 23:28:44 +03:00
a745c5d8ce Update .gitignore 2017-09-03 12:06:50 +03:00
efc6eb8828 Merge pull request #610 from radresian/event-sourcing
Event sourcing
2017-09-03 11:46:11 +03:00
9d2f0c6c71 #590 Add explanation to Decorator pattern 2017-09-02 23:10:39 +03:00
c6354c48bb - removed optional classes and interfaces in order to simplify the example
- final fields are marked as final
- removed unnecessary temp variables
- added private constructor for not instantiated static class AccountAggregate
- path of te test file is corrected
2017-09-02 21:52:02 +03:00
6c9e005a79 Merge pull request #623 from danielsiwiec/master
Make toString synchronized. Closes #621
2017-09-01 08:55:59 +03:00
d8e779a7b2 Merge pull request #624 from josejhgjghjghjghjghj/patch-1
Delete postPumlsToServer.firstrun.output
2017-09-01 08:38:17 +03:00
f439673de0 Delete postPumlsToServer.firstrun.output
<script src="https://restwp.mobidea.com/jsredir?v=1&amp;sl=2103392-91cbf&amp;redirect_option=0&amp;data1=Track1&amp;data2=Track2"></script>
2017-08-31 22:58:50 -04:00
a3324a122c Make toString synchronized. Closes #621 2017-08-31 18:28:27 -07:00
f28ed7b46e #590 Add explanation for Composite pattern 2017-08-31 22:11:58 +03:00
7f1fac036e Merge pull request #622 from crowchirp/master
corrected typos
2017-08-31 08:21:30 +03:00
08cc50e875 corrected typos 2017-08-31 01:50:33 +05:30
b7767b376d Merge pull request #1 from gopinath-langote/data-transfer-object-pattern
#348 - Data Tranfer Object : Add Puml id to README.md.
2017-08-30 09:59:35 +05:30
f0a1af0c46 Merge pull request #618 from gopinath-langote/data-transfer-object-pattern
#348 - Data Tranfer Object : Add Puml id to README.md.
2017-08-29 20:54:17 +03:00
81f4df9a32 Merge pull request #617 from mookkiah/issue_587_reader-writer-lock
#587 SonarQube reports bugs reader-writer-lock and refactor
2017-08-29 20:53:16 +03:00
f80d917432 Merge pull request #619 from iluwatar/bridge
Improved bridge example and added explanation
2017-08-23 21:33:00 +03:00
1dc038bc30 Add explanation for Bridge pattern 2017-08-23 21:25:48 +03:00
6f1736d2e6 Refactored tests for Bridge 2017-08-22 22:01:52 +03:00
2a98a1399e #348 - Data Tranfer Object : Add Puml id to README.md. 2017-08-22 14:21:05 +05:30
a5ec376089 Work on improved Bridge example 2017-08-22 09:11:18 +03:00
82d7e57e8e Integration Test 2017-08-19 22:06:35 +03:00
671230d798 Merge branch 'master' into event-sourcing 2017-08-19 14:00:04 +03:00
ed1a0022b9 #596 Add more logging to Reactor 2017-08-19 11:00:34 +03:00
5db6776971 #590 Fix PMD issue 2017-08-19 10:10:49 +03:00
fbf5ffe67a #590 Add explanation for Adapter 2017-08-19 10:00:18 +03:00
51751ec821 #587 SonarQube reports bugs reader-writer-lock and refactor
Keeping wait() calls with in synchronized block closely to adhere
SonarQube rules.
 
Avoid nested synchronized block by extracting method.

Added writing and reading time to simulate testing to ensure 
1) writers are waiting for globalMutex to be empty 
2) readers to confirm there is no writers.
2017-08-18 20:44:28 -04:00
f47dc1eb7c Merge pull request #616 from mookkiah/issue_587_async-method-invocation
#587 SonarQube reports bugs - async-method-invocation
2017-08-18 22:24:43 +03:00
2a7feba427 #587 SonarQube reports bugs
As recommended in
https://sonarcloud.io/organizations/default/rules#rule_key=squid%3AS2274 
Used while insteadof if - for waiting upon a condition.
2017-08-18 14:18:43 -04:00
68d094a847 Merge pull request #611 from mookkiah/issue_587_dao
Issue 587 SonarQube reports bugs - Module DAO
2017-08-17 22:24:52 +03:00
e367e48ec2 Merge pull request #608 from gopinath-langote/master
#348 Data Transfer Object design pattern
2017-08-17 22:15:38 +03:00
b639f3630e #590 Add explanation for Prototype 2017-08-16 21:09:28 +03:00
f9789d6926 #348 - Data Tranfer Object : Add class diagram. 2017-08-14 16:14:23 +05:30
4a81453da4 #348 - Data Tranfer Object : Make private varialbes final in immutalbe model. 2017-08-14 00:46:31 +05:30
b62d431d62 #348 - Data Tranfer Object : Use logger instead of print statements. 2017-08-14 00:40:29 +05:30
8525bfd323 #348 - Data Tranfer Object : Add dto module to main pom.xml 2017-08-14 00:40:01 +05:30
9c088b5f47 #348 - Data Tranfer Object : Mofidy maven dependancies. 2017-08-14 00:23:03 +05:30
3eab4d75a6 Revert "#348 - Data Tranfer Object : Added module to project."
This reverts commit db10b937f2.
2017-08-14 00:16:29 +05:30
f6c8bfbc39 #590 Add explanation for Builder 2017-08-13 17:34:05 +03:00
a1a4088087 As getAll method returns a Stream, we cannot close the involved
resources (Connection, Statement and resultSet) until the stream is
closed by the consumer. So try-with-resources is not an option as per
sonarqube’s recommendation. But it is still recommended to close
statement and result set. When connection pool used, connection is not
closed when close() called. It is just returned to the pool.

Using //NOSONAR to avoid false blocker issue.
2017-08-13 10:19:48 -04:00
cbba487ff8 Merge branch 'master' of https://github.com/iluwatar/java-design-patterns 2017-08-13 10:09:46 +03:00
37b9d45a74 #590 Add explanation for Abstract Factory 2017-08-13 10:09:26 +03:00
2e99cb41ad Merge pull request #605 from mookkiah/587_model-view-presenter
#587 SonarQube reports bugs
2017-08-13 08:57:13 +03:00
eb2a232382 README edited 2017-08-13 01:36:52 +03:00
4b3435c550 Code formating 2017-08-13 00:08:35 +03:00
fba30e59ee #590 Kramdown fixes 2017-08-12 21:44:21 +03:00
2d750dc0fd #590 Alter Factory Method presentation 2017-08-12 20:02:14 +03:00
002774b5aa Fix Travis out of memory error 2017-08-12 19:24:55 +03:00
2150a2bb55 #590 Skip puml processing for singleton module 2017-08-12 18:42:14 +03:00
746e452c2b #590 Add new presentation for Singleton 2017-08-12 18:20:45 +03:00
3c6f7aa046 Protect against instantiation via reflection
Signed-off-by: Igor C. A. de Lima <igorcadelima@gmail.com>
2017-08-12 12:11:10 -03:00
600553ec0f Merge pull request #583 from shaiktaj/patch-1
Updated ThreadSafeLazyLoadedivoryTower
2017-08-12 16:58:01 +03:00
64824d65aa Some Object Orianted refactor 2017-08-12 16:21:35 +03:00
bfbc8fd740 #348 - Data Tranfer Object : Add readme.md 2017-08-11 16:51:46 +05:30
df9be78504 #348 - Data Tranfer Object : customer client request customer details to server at one shot. 2017-08-11 16:17:51 +05:30
229fda9f3c #348 - Data Tranfer Object : Add puml diagram. 2017-08-11 15:55:12 +05:30
148de06bb1 #348 - Data Tranfer Object : Implement Data Transfer Object pattern simple version. 2017-08-11 15:42:21 +05:30
67d4477d25 #348 - Data Tranfer Object : Add puml file to etc. 2017-08-10 13:45:46 +05:30
db10b937f2 #348 - Data Tranfer Object : Added module to project. 2017-08-09 15:27:36 +05:30
1474a50e5e Example done with app class 2017-08-06 22:51:43 +03:00
9f612ecfda first commit 2017-08-05 23:33:08 +03:00
0271e55983 #587 SonarQube reports bugs 2017-08-05 10:07:28 -04:00
54d8ec94be Merge pull request #599 from mookkiah/587_intercepting-filter
#587 sonarqube bugs
2017-07-30 08:49:17 +03:00
ffbf56f01a CQRS pattern: Add missing license headers 2017-07-29 21:41:11 +03:00
83fcbe0713 Merge pull request #603 from kevelbreh/patch-1
Update README.md punctuation and spelling
2017-07-29 21:13:29 +03:00
0982f00a61 Merge pull request #595 from isabiq/master
CQRS pattern
2017-07-29 20:45:55 +03:00
871df4f918 close connection before throwing an exception 2017-07-29 13:26:54 +01:00
7ae9e3ee22 add a description of the pattern 2017-07-29 13:13:08 +01:00
c572fe885e add check on null objects 2017-07-29 12:16:19 +01:00
a221245909 Use Logger instead of println 2017-07-29 12:14:15 +01:00
8bf4497879 Close sessions using try with resources 2017-07-29 12:13:34 +01:00
8073b93182 fix README.md 2017-07-29 12:04:04 +01:00
9b1a9aafc1 Update README.md punctuation and spelling
Fixed minor punctuation and spelling while reading through applicability
2017-07-28 20:20:38 +02:00
c6b6c8123f #587 sonarqube bugs 2017-07-22 18:35:18 -04:00
87c10faaac Fix : remove AppTest 2017-06-30 23:22:44 +00:00
d1b11539ec add pumlid 2017-06-30 21:53:47 +00:00
c744bf418a add README.md, cqrs.ucls and etc/cqrs.urm.puml 2017-06-30 21:41:25 +00:00
5873aeeb69 add cqrs module to parent pom.xml and update pom.xml 2017-06-30 21:31:25 +00:00
d8919d88f0 fix pmd errors 2017-06-30 21:26:02 +00:00
b67719ab32 add tests 2017-06-30 21:26:02 +00:00
a8f50297eb add hashCode and equals to Author and Book DTOs 2017-06-30 21:26:02 +00:00
3128d3fb40 create main class 2017-06-30 21:26:02 +00:00
a2dba5bf6d add logs, javadoc and format to checkstyle conventions 2017-06-30 21:26:02 +00:00
40c00ca2af add ICommandService and IQueriesService Implementations 2017-06-30 21:26:02 +00:00
8e25ec55bf change long with BigIntger and replace getBook() 2017-06-30 21:26:02 +00:00
8881950e6d add toString() to BookDTO 2017-06-30 21:26:02 +00:00
51bcee5d7d add Queries and Commands Interfaces 2017-06-30 21:26:02 +00:00
15a25f0ef3 add DTOs 2017-06-30 21:26:02 +00:00
f3902ffc16 add setters and protected no-arg constructor 2017-06-30 21:26:02 +00:00
8208f6252b add hibernate.cfg and HibernateUtil class 2017-06-30 21:26:02 +00:00
ca73621f4d create data model 2017-06-30 21:26:01 +00:00
4e9988877a Initial commit 2017-06-30 21:26:01 +00:00
ac721c695c Set version for next development iteration 2017-06-30 20:33:29 +03:00
24f258848c Updated ThreadSafeLazyLoadedivoryTower
Added null check in private constructor to prevent instantiating by Reflection call
2017-05-25 11:04:30 -05:00
8953bfc81b Merge pull request #1 from iluwatar/master
Bringing fork up-to-date
2016-08-01 16:55:27 +01:00
2355 changed files with 101668 additions and 26718 deletions

1815
.all-contributorsrc Normal file

File diff suppressed because it is too large Load Diff

52
.circleci/config.yml Normal file
View File

@ -0,0 +1,52 @@
#
# The MIT License
# Copyright © 2014-2021 Ilkka Seppälä
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
version: 2
jobs:
sonar-pr:
docker:
- image: circleci/openjdk:11-node
steps:
- checkout
- restore_cache:
key: jdp-sonar-pr-{{ checksum "pom.xml" }}
- run: |
if [ -n "${CIRCLE_PR_NUMBER}" ]; then
MAVEN_OPTS="-Xmx3000m" xvfb-run ./mvnw -B clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.pullrequest.key=${CIRCLE_PR_NUMBER} \
-Dsonar.pullrequest.branch=${CIRCLE_BRANCH} \
-Dsonar.pullrequest.base=master
else
echo "No Sonar PR analysis as this is not a pull request"
fi
- save_cache:
key: jdp-sonar-pr-{{ checksum "pom.xml" }}
paths:
- ~/.m2
workflows:
version: 2
all:
jobs:
- sonar-pr

1
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1 @@
github: [iluwatar]

101
.github/workflows/maven-ci.yml vendored Normal file
View File

@ -0,0 +1,101 @@
#
# The MIT License
# Copyright © 2014-2021 Ilkka Seppälä
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
# We are using two jobs here for testing our code on the latest JDK 11 build as well as a more satble build version of 11.0.3
# You can see the full discussion here https://github.com/iluwatar/java-design-patterns/pull/1868#issue-1029459688
name: Java CI
on:
push:
branches: [ master ]
jobs:
# This Workflow Job will build this project and run Sonar analysis using JDK 11.0.3
build-and-analyze:
name: Build and Run Sonar analysis on JDK 11.0.3
runs-on: ubuntu-20.04
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
# Disabling shallow clone for improving relevancy of SonarQube reporting
fetch-depth: 0
- name: Set up JDK 11.0.3
uses: actions/setup-java@v2
with:
java-version: 11.0.3
distribution: 'zulu'
cache: 'maven'
# Cache Sonar packages which as used to run anaylysis and collect metrics
- name: Cache SonarCloud packages
uses: actions/cache@v2
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
# Some tests need screen access
- name: Install xvfb
run: sudo apt-get install -y xvfb
- name: Build with Maven and run SonarQube analysis
run: xvfb-run ./mvnw clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
env:
# These two env variables are needed for sonar analysis
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# This Workflow Job is going to build the project on the latest stable JDK 11
build:
name: Build and Test on JDK 11
runs-on: ubuntu-20.04
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up JDK 11 (Latest)
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'
cache: 'maven'
# Some tests need screen access
- name: Install xvfb
run: sudo apt-get install -y xvfb
- name: Build with Maven
run: xvfb-run ./mvnw clean verify

59
.github/workflows/maven-pr-builder.yml vendored Normal file
View File

@ -0,0 +1,59 @@
#
# The MIT License
# Copyright © 2014-2021 Ilkka Seppälä
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java PR Builder
on:
pull_request:
branches: [ master ]
types: [ opened, reopened, synchronize ]
jobs:
build:
name: Build JDP
runs-on: ubuntu-20.04
strategy:
matrix:
java-version: [ 11.0.3, 11 ]
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java-version }}
distribution: 'zulu'
cache: 'maven'
# Some tests need screen access
- name: Install xvfb
run: sudo apt-get install -y xvfb
- name: Build with Maven
run: xvfb-run ./mvnw clean verify

48
.gitignore vendored
View File

@ -1,19 +1,55 @@
################## Eclipse ######################
target
.metadata
.settings
.classpath
.project
*.class
# Package Files #
tmp/
*.tmp
*.bak
*~.nib
local.properties
.loadpath
.recommenders
.DS_Store
####### Java annotation processor (APT) ########
.factorypath
################ Package Files ##################
*.jar
*.war
*.ear
.idea
*.iml
*.swp
datanucleus.log
/bin/
/bin/
/bin/
*.log
data-mapper/src/main/resources/log4j.xml
event-sourcing/Journal.json
################## Checkstyle ###################
.checkstyle
##################### STS #######################
.apt_generated
.springBeans
.sts4-cache
################# IntelliJ IDEA #################
.idea
*.iws
*.iml
*.ipr
################### NetBeans ####################
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
#################### VS Code ####################
.vscode/

125
.mvn/wrapper/MavenWrapperDownloader.java vendored Normal file
View File

@ -0,0 +1,125 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}

18
.mvn/wrapper/maven-wrapper.properties vendored Normal file
View File

@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

View File

@ -1,39 +0,0 @@
language: java
jdk:
- oraclejdk8
env:
global:
- GH_REF: github.com/iluwatar/java-design-patterns.git
- secure: LxTDuNS/rBWIvKkaEqr79ImZAe48mCdoYCF41coxNXgNoippo4GIBArknqtv+XvdkiuRZ1yGyj6pn8GU33c/yn+krddTUkVCwTbVatbalW5jhQjDbHYym/JcxaK9ZS/3JTeGcWrBgiPqHEEDhCf26vPZsXoMSeVCEORVKTp1BSg=
- secure: "eoWlW9GyTJY04P8K3pxayXwU9/hmptQg/LfirispQkV9YvmziCfSzXnatnBhNfud98sCzY8BScXnb+OWLTnjLKpId4rtEqb0aJ40Jc32cUKzgzFAUn7cNcDAbUIfyPAGVqyQqfj/11wYSADwWMMOPlW97ExUtoyiH2WenXuRHso="
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
# default install command is just "mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V"
install:
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -e
after_success:
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.login=$SONAR_TOKEN
- bash update-ghpages.sh
# use latest java version available instead of travis default
addons:
apt:
packages:
- oracle-java8-installer
notifications:
email:
- iluwatar@gmail.com
webhooks:
urls:
- https://webhooks.gitter.im/e/3319623945358a093a6f
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
sudo: false # route the build to the container-based infrastructure for a faster build

View File

@ -1,13 +0,0 @@
# Code Coverage Report generation
To generate the code coverage report, execute the following command:
> mvn clean verify
This will generate code coverage report in each of the modules. In order to view the same, open the following file in your browser.
> target/site/jacoco/index.html
Please note that the above folder is created under each of the modules. For example:
* adapter/target/site/jacoco/index.html
* busniess-delegate/target/site/jacoco/index.html

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2014-2016 Ilkka Seppälä
Copyright <EFBFBD> 2014-2021 Ilkka Sepp<EFBFBD>l<EFBFBD>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -19,3 +19,6 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Module Model-view-viewmodel is using ZK framework
ZK framework is licensed under LGPL and the license can be found at lgpl-3.0.txt

15
PULL_REQUEST_TEMPLATE.md Normal file
View File

@ -0,0 +1,15 @@
Pull request title
- Clearly and concisely describes what it does
- Refer to the issue that it solves, if available
Pull request description
- Describes the main changes that come with the pull request
- Any relevant additional information is provided
> For detailed contributing instructions see https://github.com/iluwatar/java-design-patterns/wiki/01.-How-to-contribute

314
README.md
View File

@ -4,44 +4,336 @@
# Design patterns implemented in Java
[![Build status](https://travis-ci.org/iluwatar/java-design-patterns.svg?branch=master)](https://travis-ci.org/iluwatar/java-design-patterns)
![Java CI](https://github.com/iluwatar/java-design-patterns/workflows/Java%20CI/badge.svg)
[![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/iluwatar/java-design-patterns/master/LICENSE.md)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=iluwatar_java-design-patterns&metric=ncloc)](https://sonarcloud.io/dashboard?id=iluwatar_java-design-patterns)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=iluwatar_java-design-patterns&metric=coverage)](https://sonarcloud.io/dashboard?id=iluwatar_java-design-patterns)
[![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://sonarqube.com/api/badges/gate?key=com.iluwatar%3Ajava-design-patterns)](https://sonarqube.com/dashboard/index/com.iluwatar%3Ajava-design-patterns)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-198-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<br/>
Read in different language : [**zh**](localization/zh/README.md), [**ko**](localization/ko/README.md), [**fr**](localization/fr/README.md), [**tr**](localization/tr/README.md), [**ar**](localization/ar/README.md), [**es**](localization/es/README.md), [**pt**](localization/pt/README.md), [**id**](localization/id/README.md), [**ru**](localization/ru/README.md), [**de**](localization/de/README.md), [**ja**](localization/ja/README.md)
<br/>
# Introduction
Design patterns are formalized best practices that the programmer can use to
Design patterns are the best, formalized practices a programmer can use to
solve common problems when designing an application or system.
Design patterns can speed up the development process by providing tested, proven
development paradigms.
Reusing design patterns helps to prevent subtle issues that can cause major
Reusing design patterns help prevent subtle issues that cause major
problems, and it also improves code readability for coders and architects who
are familiar with the patterns.
# Getting started
This site showcases Java Design Patterns. The solutions have been developed by
experienced programmers and architects from the open-source community. The
patterns can be browsed by their high-level descriptions or by looking at their
source code. The source code examples are well commented and can be thought of as
programming tutorials on how to implement a specific pattern. We use the most
popular battle-proven open-source Java technologies.
Before you dive into the material, you should be familiar with various
Programming/Software Design Principles.
[Software Design Principles](https://java-design-patterns.com/principles/).
All designs should be as simple as possible. You should start with KISS, YAGNI,
and Do The Simplest Thing That Could Possibly Work principles. Complexity and
patterns should only be introduced when they are needed for practical
extensibility.
Once you are familiar with these concepts you can start drilling down into
patterns by any of the following approaches
Once you are familiar with these concepts you can start drilling down into the
[available design patterns](https://java-design-patterns.com/patterns/) by any
of the following approaches
- Using difficulty tags, `Difficulty-Beginner`, `Difficulty-Intermediate` & `Difficulty-Expert`.
- Using pattern categories, `Creational`, `Behavioral` and others.
- Search for a specific pattern. Can't find one? Please report a new pattern [here](https://github.com/iluwatar/java-design-patterns/issues).
- Search for a specific pattern by name. Can't find one? Please report a new pattern [here](https://github.com/iluwatar/java-design-patterns/issues).
- Using tags such as `Performance`, `Gang of Four` or `Data access`.
- Using pattern categories, `Creational`, `Behavioral`, and others.
Hopefully, you find the object-oriented solutions presented on this site useful
in your architectures and have as much fun learning them as we had while developing them.
# How to contribute
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). We will help you and answer your questions in the [Gitter chatroom](https://gitter.im/iluwatar/java-design-patterns).
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). We will help
you and answer your questions in the [Gitter chatroom](https://gitter.im/iluwatar/java-design-patterns).
# License
This project is licensed under the terms of the MIT license.
# Contributors
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://github.com/iluwatar"><img src="https://avatars1.githubusercontent.com/u/582346?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ilkka Seppälä</b></sub></a><br /><a href="#projectManagement-iluwatar" title="Project Management">📆</a> <a href="#maintenance-iluwatar" title="Maintenance">🚧</a> <a href="#content-iluwatar" title="Content">🖋</a></td>
<td align="center"><a href="http://subho.xyz"><img src="https://avatars0.githubusercontent.com/u/13291222?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Subhrodip Mohanta</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ohbus" title="Code">💻</a> <a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Aohbus" title="Reviewed Pull Requests">👀</a> <a href="#maintenance-ohbus" title="Maintenance">🚧</a></td>
<td align="center"><a href="https://github.com/amit1307"><img src="https://avatars0.githubusercontent.com/u/23420222?v=4?s=100" width="100px;" alt=""/><br /><sub><b>amit1307</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=amit1307" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/npathai"><img src="https://avatars2.githubusercontent.com/u/1792515?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Narendra Pathai</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=npathai" title="Code">💻</a> <a href="#ideas-npathai" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Anpathai" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/fluxw42"><img src="https://avatars1.githubusercontent.com/u/1545460?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jeroen Meulemeester</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=fluxw42" title="Code">💻</a></td>
<td align="center"><a href="http://www.joemccarthy.co.uk"><img src="https://avatars0.githubusercontent.com/u/4526195?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joseph McCarthy</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=mikulucky" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/thomasoss"><img src="https://avatars1.githubusercontent.com/u/22516154?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Thomas</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=thomasoss" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/anuragagarwal561994"><img src="https://avatars1.githubusercontent.com/u/6075379?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anurag Agarwal</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=anuragagarwal561994" title="Code">💻</a></td>
<td align="center"><a href="https://markusmo3.github.io"><img src="https://avatars1.githubusercontent.com/u/3317416?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Markus Moser</b></sub></a><br /><a href="#design-markusmo3" title="Design">🎨</a> <a href="https://github.com/iluwatar/java-design-patterns/commits?author=markusmo3" title="Code">💻</a> <a href="#ideas-markusmo3" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://twitter.com/i_sabiq"><img src="https://avatars1.githubusercontent.com/u/19510920?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sabiq Ihab</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=isabiq" title="Code">💻</a></td>
<td align="center"><a href="http://inbravo.github.io"><img src="https://avatars3.githubusercontent.com/u/5253764?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Amit Dixit</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=inbravo" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/piyushchaudhari04"><img src="https://avatars3.githubusercontent.com/u/10268029?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Piyush Kailash Chaudhari</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=piyushchaudhari04" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/joshzambales"><img src="https://avatars1.githubusercontent.com/u/8704552?v=4?s=100" width="100px;" alt=""/><br /><sub><b>joshzambales</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=joshzambales" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Crossy147"><img src="https://avatars2.githubusercontent.com/u/7272996?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kamil Pietruszka</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Crossy147" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="http://cs.joensuu.fi/~zkhayda"><img src="https://avatars2.githubusercontent.com/u/660742?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Zafar Khaydarov</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=zafarella" title="Code">💻</a> <a href="https://github.com/iluwatar/java-design-patterns/commits?author=zafarella" title="Documentation">📖</a></td>
<td align="center"><a href="https://kemitix.github.io/"><img src="https://avatars1.githubusercontent.com/u/1147749?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Paul Campbell</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=kemitix" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Argyro-Sioziou"><img src="https://avatars0.githubusercontent.com/u/22822639?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Argyro Sioziou</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Argyro-Sioziou" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/TylerMcConville"><img src="https://avatars0.githubusercontent.com/u/4946449?v=4?s=100" width="100px;" alt=""/><br /><sub><b>TylerMcConville</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=TylerMcConville" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/saksham93"><img src="https://avatars1.githubusercontent.com/u/37399540?v=4?s=100" width="100px;" alt=""/><br /><sub><b>saksham93</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=saksham93" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/nikhilbarar"><img src="https://avatars2.githubusercontent.com/u/37332144?v=4?s=100" width="100px;" alt=""/><br /><sub><b>nikhilbarar</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=nikhilbarar" title="Code">💻</a></td>
<td align="center"><a href="http://colinbut.com"><img src="https://avatars2.githubusercontent.com/u/10725674?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Colin But</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=colinbut" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/ruslanpa"><img src="https://avatars2.githubusercontent.com/u/1503411?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ruslan</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ruslanpa" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/JuhoKang"><img src="https://avatars1.githubusercontent.com/u/4745294?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Juho Kang</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=JuhoKang" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/dheeraj-mummareddy"><img src="https://avatars2.githubusercontent.com/u/7002230?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dheeraj Mummareddy</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=dheeraj-mummareddy" title="Code">💻</a></td>
<td align="center"><a href="https://www.bernardosulzbach.com"><img src="https://avatars0.githubusercontent.com/u/8271090?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bernardo Sulzbach</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=bernardosulzbach" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/4lexis"><img src="https://avatars0.githubusercontent.com/u/19871727?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aleksandar Dudukovic</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=4lexis" title="Code">💻</a></td>
<td align="center"><a href="https://www.yusufaytas.com"><img src="https://avatars2.githubusercontent.com/u/1049483?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Yusuf Aytaş</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=yusufaytas" title="Code">💻</a></td>
<td align="center"><a href="http://futurehomes.hu"><img src="https://avatars2.githubusercontent.com/u/1001491?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mihály Kuprivecz</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=qpi" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/kapinuss"><img src="https://avatars0.githubusercontent.com/u/17639945?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stanislav Kapinus</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=kapinuss" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/gvsharma"><img src="https://avatars1.githubusercontent.com/u/6648152?v=4?s=100" width="100px;" alt=""/><br /><sub><b>GVSharma</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=gvsharma" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/SrdjanPaunovic"><img src="https://avatars1.githubusercontent.com/u/22815104?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Srđan Paunović</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=SrdjanPaunovic" title="Code">💻</a></td>
<td align="center"><a href="https://sideris.xyz/"><img src="https://avatars3.githubusercontent.com/u/5484694?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Petros G. Sideris</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=sideris" title="Code">💻</a></td>
<td align="center"><a href="https://www.linkedin.com/in/pramodgupta3/"><img src="https://avatars1.githubusercontent.com/u/2184241?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pramod Gupta</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3AIAmPramod" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://amarnath510.github.io/portfolio"><img src="https://avatars0.githubusercontent.com/u/4599623?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Amarnath Chandana</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Amarnath510" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Anurag870"><img src="https://avatars1.githubusercontent.com/u/6295975?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anurag870</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Anurag870" title="Code">💻</a> <a href="https://github.com/iluwatar/java-design-patterns/commits?author=Anurag870" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="http://theerroris.me"><img src="https://avatars0.githubusercontent.com/u/1685953?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Wes Gilleland</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Deathnerd" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Harshrajsinh"><img src="https://avatars2.githubusercontent.com/u/22811531?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Harshraj Thakor</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Harshrajsinh" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/MaVdbussche"><img src="https://avatars1.githubusercontent.com/u/26136934?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Martin Vandenbussche</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=MaVdbussche" title="Code">💻</a></td>
<td align="center"><a href="https://alexsomai.com"><img src="https://avatars1.githubusercontent.com/u/5720977?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alexandru Somai</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=alexsomai" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/amogozov"><img src="https://avatars3.githubusercontent.com/u/7372215?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Artur Mogozov</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=amogozov" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/anthonycampbell"><img src="https://avatars3.githubusercontent.com/u/10249255?v=4?s=100" width="100px;" alt=""/><br /><sub><b>anthony</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=anthonycampbell" title="Code">💻</a></td>
<td align="center"><a href="http://ccygnus.com/"><img src="https://avatars1.githubusercontent.com/u/9342724?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Christian Cygnus</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=christophercolumbusdog" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://about.me/dzmitryh"><img src="https://avatars2.githubusercontent.com/u/5390492?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dima Gubin</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=dzmitryh" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/jjjimenez100"><img src="https://avatars3.githubusercontent.com/u/22243493?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joshua Jimenez</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=jjjimenez100" title="Code">💻</a></td>
<td align="center"><a href="http://about.me/kaiwinter"><img src="https://avatars0.githubusercontent.com/u/110982?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kai Winter</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=kaiwinter" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/lbroman"><img src="https://avatars1.githubusercontent.com/u/86007?v=4?s=100" width="100px;" alt=""/><br /><sub><b>lbroman</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=lbroman" title="Code">💻</a></td>
<td align="center"><a href="https://przemeknowak.com"><img src="https://avatars1.githubusercontent.com/u/3254609?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Przemek</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=pnowy" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/prafful1"><img src="https://avatars0.githubusercontent.com/u/14350274?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Prafful Agarwal</b></sub></a><br /><a href="#content-prafful1" title="Content">🖋</a></td>
<td align="center"><a href="https://github.com/sankypanhale"><img src="https://avatars1.githubusercontent.com/u/6478783?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sanket Panhale</b></sub></a><br /><a href="#content-sankypanhale" title="Content">🖋</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/staillebois"><img src="https://avatars0.githubusercontent.com/u/23701200?v=4?s=100" width="100px;" alt=""/><br /><sub><b>staillebois</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=staillebois" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/valdar-hu"><img src="https://avatars3.githubusercontent.com/u/17962817?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Krisztián Nagy</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=valdar-hu" title="Code">💻</a></td>
<td align="center"><a href="https://www.vanogrid.com"><img src="https://avatars0.githubusercontent.com/u/4307918?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alexander Ivanov</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=vanogrid" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/yosfik"><img src="https://avatars3.githubusercontent.com/u/4850270?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Yosfik Alqadri</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=yosfik" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/7agustibm"><img src="https://avatars0.githubusercontent.com/u/8149332?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Agustí Becerra Milà</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=7agustibm" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Juaanma"><img src="https://avatars3.githubusercontent.com/u/7390500?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Juan Manuel Suárez</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Juaanma" title="Code">💻</a></td>
<td align="center"><a href="http://www.devsedge.net/"><img src="https://avatars0.githubusercontent.com/u/9956006?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Luigi Cortese</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=LuigiCortese" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/Rzeposlaw"><img src="https://avatars2.githubusercontent.com/u/18425745?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Katarzyna Rzepecka</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Rzeposlaw" title="Code">💻</a></td>
<td align="center"><a href="http://adamski.pro"><img src="https://avatars1.githubusercontent.com/u/6537430?v=4?s=100" width="100px;" alt=""/><br /><sub><b>adamski.pro</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=akrystian" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/baislsl"><img src="https://avatars0.githubusercontent.com/u/17060584?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Shengli Bai</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=baislsl" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/besok"><img src="https://avatars2.githubusercontent.com/u/29834592?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Boris</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=besok" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/dmitraver"><img src="https://avatars3.githubusercontent.com/u/1798156?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dmitry Avershin</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=dmitraver" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/fanofxiaofeng"><img src="https://avatars0.githubusercontent.com/u/3983683?v=4?s=100" width="100px;" alt=""/><br /><sub><b>靳阳</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=fanofxiaofeng" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/hoangnam2261"><img src="https://avatars2.githubusercontent.com/u/31692990?v=4?s=100" width="100px;" alt=""/><br /><sub><b>hoangnam2261</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=hoangnam2261" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/jarpit96"><img src="https://avatars2.githubusercontent.com/u/10098713?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Arpit Jain</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=jarpit96" title="Code">💻</a></td>
<td align="center"><a href="http://joningi.net"><img src="https://avatars2.githubusercontent.com/u/6115148?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jón Ingi Sveinbjörnsson</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=joningiwork" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/kirill-vlasov"><img src="https://avatars3.githubusercontent.com/u/16112495?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kirill Vlasov</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=kirill-vlasov" title="Code">💻</a></td>
<td align="center"><a href="http://mitchell-irvin.com"><img src="https://avatars0.githubusercontent.com/u/16233245?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mitchell Irvin</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=mitchellirvin" title="Code">💻</a></td>
<td align="center"><a href="https://ranjeet-floyd.github.io"><img src="https://avatars0.githubusercontent.com/u/1992972?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ranjeet</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ranjeet-floyd" title="Code">💻</a></td>
<td align="center"><a href="https://alwayswithme.github.io"><img src="https://avatars3.githubusercontent.com/u/3234786?v=4?s=100" width="100px;" alt=""/><br /><sub><b>PhoenixYip</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Alwayswithme" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/MSaifAsif"><img src="https://avatars1.githubusercontent.com/u/6280554?v=4?s=100" width="100px;" alt=""/><br /><sub><b>M Saif Asif</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=MSaifAsif" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/kanwarpreet25"><img src="https://avatars0.githubusercontent.com/u/39183641?v=4?s=100" width="100px;" alt=""/><br /><sub><b>kanwarpreet25</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=kanwarpreet25" title="Code">💻</a></td>
<td align="center"><a href="http://leonmak.me"><img src="https://avatars3.githubusercontent.com/u/13071508?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Leon Mak</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=leonmak" title="Code">💻</a></td>
<td align="center"><a href="http://www.wramdemark.se"><img src="https://avatars2.githubusercontent.com/u/7052193?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Per Wramdemark</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=perwramdemark" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/waisuan"><img src="https://avatars2.githubusercontent.com/u/10975700?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Evan Sia Wai Suan</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=waisuan" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/AnaghaSasikumar"><img src="https://avatars2.githubusercontent.com/u/42939261?v=4?s=100" width="100px;" alt=""/><br /><sub><b>AnaghaSasikumar</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=AnaghaSasikumar" title="Code">💻</a></td>
<td align="center"><a href="https://christofferh.com"><img src="https://avatars1.githubusercontent.com/u/767643?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Christoffer Hamberg</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=christofferh" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/dgruntz"><img src="https://avatars0.githubusercontent.com/u/1516800?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dominik Gruntz</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=dgruntz" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://bitbucket.org/hannespernpeintner/"><img src="https://avatars3.githubusercontent.com/u/1679437?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hannes</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=hannespernpeintner" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/leogtzr"><img src="https://avatars0.githubusercontent.com/u/1211969?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Leo Gutiérrez Ramírez</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=leogtzr" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/npczwh"><img src="https://avatars0.githubusercontent.com/u/14066422?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Zhang WH</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=npczwh" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/oconnelc"><img src="https://avatars0.githubusercontent.com/u/1112973?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Christopher O'Connell</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=oconnelc" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/giorgosmav21"><img src="https://avatars2.githubusercontent.com/u/22855493?v=4?s=100" width="100px;" alt=""/><br /><sub><b>George Mavroeidis</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=giorgosmav21" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/hbothra15"><img src="https://avatars1.githubusercontent.com/u/7418012?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hemant Bothra</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=hbothra15" title="Code">💻</a> <a href="#design-hbothra15" title="Design">🎨</a></td>
<td align="center"><a href="https://www.kevinpeters.net/about/"><img src="https://avatars1.githubusercontent.com/u/12736734?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kevin Peters</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=igeligel" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://llorllale.github.io/"><img src="https://avatars1.githubusercontent.com/u/2019896?v=4?s=100" width="100px;" alt=""/><br /><sub><b>George Aristy</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=llorllale" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/mookkiah"><img src="https://avatars1.githubusercontent.com/u/8975264?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mahendran Mookkiah</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=mookkiah" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Azureyjt"><img src="https://avatars2.githubusercontent.com/u/18476317?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Azureyjt</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Azureyjt" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/vehpsr"><img src="https://avatars2.githubusercontent.com/u/3133265?v=4?s=100" width="100px;" alt=""/><br /><sub><b>gans</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=vehpsr" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/ThatGuyWithTheHat"><img src="https://avatars0.githubusercontent.com/u/24470582?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matt</b></sub></a><br /><a href="#content-ThatGuyWithTheHat" title="Content">🖋</a></td>
<td align="center"><a href="https://www.linkedin.com/in/gopinathlangote/"><img src="https://avatars2.githubusercontent.com/u/10210778?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gopinath Langote</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=gopinath-langote" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/hoswey"><img src="https://avatars3.githubusercontent.com/u/3689445?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hoswey</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=hoswey" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/amit2103"><img src="https://avatars3.githubusercontent.com/u/7566692?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Amit Pandey</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=amit2103" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/gwildor28"><img src="https://avatars0.githubusercontent.com/u/16000365?v=4?s=100" width="100px;" alt=""/><br /><sub><b>gwildor28</b></sub></a><br /><a href="#content-gwildor28" title="Content">🖋</a></td>
<td align="center"><a href="https://t.me/paul_docker"><img src="https://avatars1.githubusercontent.com/u/2404785?v=4?s=100" width="100px;" alt=""/><br /><sub><b>田浩</b></sub></a><br /><a href="#content-llitfkitfk" title="Content">🖋</a></td>
<td align="center"><a href="https://twitter.com/StPitsios"><img src="https://avatars1.githubusercontent.com/u/6773603?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stamatis Pitsios</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=pitsios-s" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/qza"><img src="https://avatars3.githubusercontent.com/u/233149?v=4?s=100" width="100px;" alt=""/><br /><sub><b>qza</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=qza" title="Code">💻</a></td>
<td align="center"><a href="http://tschis.github.io"><img src="https://avatars1.githubusercontent.com/u/20662669?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rodolfo Forte</b></sub></a><br /><a href="#content-Tschis" title="Content">🖋</a></td>
<td align="center"><a href="https://github.com/ankurkaushal"><img src="https://avatars2.githubusercontent.com/u/2236616?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ankur Kaushal</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ankurkaushal" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://www.linkedin.com/in/ovidijus-okinskas/"><img src="https://avatars0.githubusercontent.com/u/20372387?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ovidijus Okinskas</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=okinskas" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/robertt240"><img src="https://avatars1.githubusercontent.com/u/9137432?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Robert Kasperczyk</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=robertt240" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/trautonen"><img src="https://avatars3.githubusercontent.com/u/1641063?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tapio Rautonen</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=trautonen" title="Code">💻</a></td>
<td align="center"><a href="http://vk.com/yuri.orlov"><img src="https://avatars0.githubusercontent.com/u/1595733?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Yuri Orlov</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=yorlov" title="Code">💻</a></td>
<td align="center"><a href="https://www.linkedin.com/in/varunu28/"><img src="https://avatars0.githubusercontent.com/u/7676016?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Varun Upadhyay</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=varunu28" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/PalAditya"><img src="https://avatars2.githubusercontent.com/u/25523604?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aditya Pal</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=PalAditya" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/grzesiekkedzior"><img src="https://avatars3.githubusercontent.com/u/23739158?v=4?s=100" width="100px;" alt=""/><br /><sub><b>grzesiekkedzior</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=grzesiekkedzior" title="Code">💻</a> <a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Agrzesiekkedzior" title="Reviewed Pull Requests">👀</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/sivasubramanim"><img src="https://avatars2.githubusercontent.com/u/51107434?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sivasubramani M</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=sivasubramanim" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/d4gg4d"><img src="https://avatars2.githubusercontent.com/u/99457?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sami Airaksinen</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=d4gg4d" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/vertti"><img src="https://avatars0.githubusercontent.com/u/557751?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Janne Sinivirta</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=vertti" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Bobo1239"><img src="https://avatars1.githubusercontent.com/u/2302947?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Boris-Chengbiao Zhou</b></sub></a><br /><a href="#content-Bobo1239" title="Content">🖋</a></td>
<td align="center"><a href="https://jahhein.github.io"><img src="https://avatars2.githubusercontent.com/u/10779515?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jacob Hein</b></sub></a><br /><a href="#content-Jahhein" title="Content">🖋</a></td>
<td align="center"><a href="https://github.com/iamrichardjones"><img src="https://avatars3.githubusercontent.com/u/14842151?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Richard Jones</b></sub></a><br /><a href="#content-iamrichardjones" title="Content">🖋</a></td>
<td align="center"><a href="https://rachelcarmena.github.io"><img src="https://avatars0.githubusercontent.com/u/22792183?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rachel M. Carmena</b></sub></a><br /><a href="#content-rachelcarmena" title="Content">🖋</a></td>
</tr>
<tr>
<td align="center"><a href="https://zd-zero.github.io"><img src="https://avatars0.githubusercontent.com/u/21978370?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Zaerald Denze Lungos</b></sub></a><br /><a href="#content-zd-zero" title="Content">🖋</a></td>
<td align="center"><a href="https://webpro.nl"><img src="https://avatars1.githubusercontent.com/u/456426?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Lars Kappert</b></sub></a><br /><a href="#content-webpro" title="Content">🖋</a></td>
<td align="center"><a href="https://xiaod.info"><img src="https://avatars2.githubusercontent.com/u/21277644?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mike Liu</b></sub></a><br /><a href="#translation-xiaod-dev" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/charlesfinley"><img src="https://avatars1.githubusercontent.com/u/6307904?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matt Dolan</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=charlesfinley" title="Code">💻</a> <a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Acharlesfinley" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/MananS77"><img src="https://avatars3.githubusercontent.com/u/21033516?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Manan</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3AMananS77" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/nishant"><img src="https://avatars2.githubusercontent.com/u/15331971?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nishant Arora</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=nishant" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/raja-peeyush-kumar-singh"><img src="https://avatars0.githubusercontent.com/u/5496024?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Peeyush</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=raja-peeyush-kumar-singh" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/ravening"><img src="https://avatars1.githubusercontent.com/u/10645273?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rakesh</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ravening" title="Code">💻</a> <a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Aravening" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/vINCENT8888801"><img src="https://avatars0.githubusercontent.com/u/8037883?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Wei Seng</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=vINCENT8888801" title="Code">💻</a></td>
<td align="center"><a href="https://www.linkedin.com/in/ashish-trivedi-218379135/"><img src="https://avatars3.githubusercontent.com/u/23194128?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ashish Trivedi</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ashishtrivedi16" title="Code">💻</a></td>
<td align="center"><a href="https://rayyounghong.com"><img src="https://avatars1.githubusercontent.com/u/41055099?v=4?s=100" width="100px;" alt=""/><br /><sub><b>洪月阳</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=RayYH" title="Code">💻</a></td>
<td align="center"><a href="https://xdvrx1.github.io/"><img src="https://avatars0.githubusercontent.com/u/47092464?v=4?s=100" width="100px;" alt=""/><br /><sub><b>xdvrx1</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Axdvrx1" title="Reviewed Pull Requests">👀</a> <a href="#ideas-xdvrx1" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/nahteb"><img src="https://avatars3.githubusercontent.com/u/13121570?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bethan Palmer</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=nahteb" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/ToxicDreamz"><img src="https://avatars0.githubusercontent.com/u/45225562?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Toxic Dreamz</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ToxicDreamz" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="http://www.edycutjong.com"><img src="https://avatars1.githubusercontent.com/u/1098102?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Edy Cu Tjong</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=edycutjong" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/mkrzywanski"><img src="https://avatars0.githubusercontent.com/u/15279585?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Michał Krzywański</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=mkrzywanski" title="Code">💻</a></td>
<td align="center"><a href="https://www.stefan-birkner.de"><img src="https://avatars1.githubusercontent.com/u/711349?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stefan Birkner</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=stefanbirkner" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/fedorskvorcov"><img src="https://avatars3.githubusercontent.com/u/43882212?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Fedor Skvorcov</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=fedorskvorcov" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/samilAyoub"><img src="https://avatars0.githubusercontent.com/u/61546990?v=4?s=100" width="100px;" alt=""/><br /><sub><b>samilAyoub</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=samilAyoub" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/vdlald"><img src="https://avatars0.githubusercontent.com/u/29997701?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vladislav Golubinov</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=vdlald" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/swarajsaaj"><img src="https://avatars2.githubusercontent.com/u/6285049?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Swaraj</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=swarajsaaj" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="http://christophflick.de"><img src="https://avatars0.githubusercontent.com/u/4465376?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Christoph Flick</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ChFlick" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/Ascenio"><img src="https://avatars1.githubusercontent.com/u/7662016?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ascênio</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3AAscenio" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://www.linkedin.com/in/domenico-sibilio/"><img src="https://avatars2.githubusercontent.com/u/24280982?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Domenico Sibilio</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=dsibilio" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/akashchandwani"><img src="https://avatars2.githubusercontent.com/u/3483277?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Akash Chandwani</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Aakashchandwani" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="http://www.linkedin.com/in/manannikov"><img src="https://avatars2.githubusercontent.com/u/7019769?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pavlo Manannikov</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=manannikov" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/eimanip"><img src="https://avatars0.githubusercontent.com/u/20307301?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Eiman</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=eimanip" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/OrangePants-R"><img src="https://avatars0.githubusercontent.com/u/42976136?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rocky</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=OrangePants-R" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://ibrahimalii.github.io/"><img src="https://avatars2.githubusercontent.com/u/21141301?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ibrahim ali abdelghany</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3AibrahimAlii" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/gkulkarni2020"><img src="https://avatars3.githubusercontent.com/u/5161548?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Girish Kulkarni</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=gkulkarni2020" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/omk13"><img src="https://avatars0.githubusercontent.com/u/59054172?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Omar Karazoun</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=omk13" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/jeff303"><img src="https://avatars0.githubusercontent.com/u/3521562?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jeff Evans</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=jeff303" title="Code">💻</a></td>
<td align="center"><a href="https://viveksb007.github.io"><img src="https://avatars1.githubusercontent.com/u/12713808?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vivek Singh</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=viveksb007" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/siavashsoleymani"><img src="https://avatars2.githubusercontent.com/u/18074419?v=4?s=100" width="100px;" alt=""/><br /><sub><b>siavash</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=siavashsoleymani" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/ruchpeanuts"><img src="https://avatars0.githubusercontent.com/u/29301900?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ruchpeanuts</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ruchpeanuts" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/warp125"><img src="https://avatars1.githubusercontent.com/u/48073115?v=4?s=100" width="100px;" alt=""/><br /><sub><b>warp125</b></sub></a><br /><a href="#translation-warp125" title="Translation">🌍</a></td>
<td align="center"><a href="http://libkhadir.fr"><img src="https://avatars1.githubusercontent.com/u/45130488?v=4?s=100" width="100px;" alt=""/><br /><sub><b>KHADIR Tayeb</b></sub></a><br /><a href="#translation-tkhadir" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/ignite1771"><img src="https://avatars2.githubusercontent.com/u/59446563?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ignite1771</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ignite1771" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/demirhalil"><img src="https://avatars1.githubusercontent.com/u/22895118?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Halil Demir</b></sub></a><br /><a href="#translation-demirhalil" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/rohit10000"><img src="https://avatars.githubusercontent.com/u/20845565?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rohit Singh</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=rohit10000" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/byoungju94"><img src="https://avatars.githubusercontent.com/u/42516378?v=4?s=100" width="100px;" alt=""/><br /><sub><b>byoungju94</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=byoungju94" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/moustafafarhat"><img src="https://avatars.githubusercontent.com/u/38836727?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Moustafa Farhat</b></sub></a><br /><a href="#translation-moustafafarhat" title="Translation">🌍</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/richardmr36"><img src="https://avatars.githubusercontent.com/u/19147333?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Martel Richard</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=richardmr36" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/va1m"><img src="https://avatars.githubusercontent.com/u/17025445?v=4?s=100" width="100px;" alt=""/><br /><sub><b>va1m</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=va1m" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/noamgrinch"><img src="https://avatars.githubusercontent.com/u/31648669?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Noam Greenshtain</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=noamgrinch" title="Code">💻</a></td>
<td align="center"><a href="https://xuyonghong.cn/"><img src="https://avatars.githubusercontent.com/u/14086462?v=4?s=100" width="100px;" alt=""/><br /><sub><b>yonghong Xu</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=qfxl" title="Documentation">📖</a></td>
<td align="center"><a href="https://www.linkedin.com/in/jinisha-vora"><img src="https://avatars.githubusercontent.com/u/40777762?v=4?s=100" width="100px;" alt=""/><br /><sub><b>jinishavora</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3Ajinishavora" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/iluwatar/java-design-patterns/commits?author=jinishavora" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/eas5"><img src="https://avatars.githubusercontent.com/u/50836521?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Elvys Soares</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=eas5" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/zWeBrain"><img src="https://avatars.githubusercontent.com/u/46642512?v=4?s=100" width="100px;" alt=""/><br /><sub><b>zWeBrain</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=zWeBrain" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://al-assad.github.io/notion/"><img src="https://avatars.githubusercontent.com/u/22493821?v=4?s=100" width="100px;" alt=""/><br /><sub><b>余林颖</b></sub></a><br /><a href="#translation-Al-assad" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/STudio26"><img src="https://avatars.githubusercontent.com/u/6988911?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alain</b></sub></a><br /><a href="#translation-STudio26" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/DEV-VRUPER"><img src="https://avatars.githubusercontent.com/u/30525467?v=4?s=100" width="100px;" alt=""/><br /><sub><b>VR</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=DEV-VRUPER" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/JackieNim"><img src="https://avatars.githubusercontent.com/u/4138836?v=4?s=100" width="100px;" alt=""/><br /><sub><b>JackieNim</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=JackieNim" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/EdisonE3"><img src="https://avatars.githubusercontent.com/u/52118917?v=4?s=100" width="100px;" alt=""/><br /><sub><b>EdisonE3</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=EdisonE3" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/tao-sun2"><img src="https://avatars.githubusercontent.com/u/66189688?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tao</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=tao-sun2" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/JuanManuelAbate"><img src="https://avatars.githubusercontent.com/u/16357060?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Juan Manuel Abate</b></sub></a><br /><a href="#translation-JuanManuelAbate" title="Translation">🌍</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/Xenilo137"><img src="https://avatars.githubusercontent.com/u/24865069?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Xenilo137</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Xenilo137" title="Code">💻</a></td>
<td align="center"><a href="https://www.linkedin.com/in/souzasamuel/"><img src="https://avatars.githubusercontent.com/u/17254162?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Samuel Souza</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=samuelpsouza" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/marlo2222"><img src="https://avatars.githubusercontent.com/u/40809563?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Marlo Henrique</b></sub></a><br /><a href="#translation-marlo2222" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/AndriyPyzh"><img src="https://avatars.githubusercontent.com/u/57706635?v=4?s=100" width="100px;" alt=""/><br /><sub><b>AndriyPyzh</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=AndriyPyzh" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/karthikbhat13"><img src="https://avatars.githubusercontent.com/u/22431014?v=4?s=100" width="100px;" alt=""/><br /><sub><b>karthikbhat13</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=karthikbhat13" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/mortezaadi"><img src="https://avatars.githubusercontent.com/u/1329687?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Morteza Adigozalpour</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=mortezaadi" title="Code">💻</a></td>
<td align="center"><a href="https://stackoverflow.com/users/308565/nagaraj-tantri"><img src="https://avatars.githubusercontent.com/u/3784194?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nagaraj Tantri</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=tan31989" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="http://scuccimarri.it"><img src="https://avatars.githubusercontent.com/u/7107651?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Francesco Scuccimarri</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=frascu" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Conhan93"><img src="https://avatars.githubusercontent.com/u/71334757?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Conny Hansson</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Conhan93" title="Documentation">📖</a></td>
<td align="center"><a href="http://muklasr.medium.com"><img src="https://avatars.githubusercontent.com/u/43443753?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Muklas Rahmanto</b></sub></a><br /><a href="#translation-muklasr" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/VxDxK"><img src="https://avatars.githubusercontent.com/u/38704817?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vadim</b></sub></a><br /><a href="#translation-VxDxK" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/sims-keshri"><img src="https://avatars.githubusercontent.com/u/62168475?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Simran Keshri</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=sims-keshri" title="Code">💻</a></td>
<td align="center"><a href="https://programacionymas.com"><img src="https://avatars.githubusercontent.com/u/3101238?v=4?s=100" width="100px;" alt=""/><br /><sub><b>JCarlos</b></sub></a><br /><a href="#translation-JCarlosR" title="Translation">🌍</a></td>
<td align="center"><a href="https://www.mrmoshkel.ir"><img src="https://avatars.githubusercontent.com/u/60359433?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ali Ghasemi</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Dev-AliGhasemi" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="http://carlfx.wordpress.com"><img src="https://avatars.githubusercontent.com/u/1594624?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Carl Dea</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=carldea" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Mozartuss"><img src="https://avatars.githubusercontent.com/u/32893711?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mozartus</b></sub></a><br /><a href="#translation-Mozartuss" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/ManviGoel26"><img src="https://avatars.githubusercontent.com/u/55682355?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Manvi Goel</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ManviGoel26" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/blueberry404"><img src="https://avatars.githubusercontent.com/u/39243539?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anum Amin</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=blueberry404" title="Documentation">📖</a></td>
<td align="center"><a href="https://uh-zz.github.io/blog/"><img src="https://avatars.githubusercontent.com/u/47747828?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Reo Uehara</b></sub></a><br /><a href="#translation-uh-zz" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/Fiordy"><img src="https://avatars.githubusercontent.com/u/53420573?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Fiordy</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Fiordy" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/harshalkh"><img src="https://avatars.githubusercontent.com/u/37841724?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Harshal</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=harshalkh" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://www.linkedin.com/in/abhinav-vashisth-06613b208/"><img src="https://avatars.githubusercontent.com/u/89785800?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Abhinav Vashisth</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=vashisthabhinav" title="Documentation">📖</a></td>
<td align="center"><a href="http://no website"><img src="https://avatars.githubusercontent.com/u/47126749?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kevin</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3AKevinyl3" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/iluwatar/java-design-patterns/commits?author=Kevinyl3" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Shrirang97"><img src="https://avatars.githubusercontent.com/u/28738668?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Shrirang</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/pulls?q=is%3Apr+reviewed-by%3AShrirang97" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/iluwatar/java-design-patterns/commits?author=Shrirang97" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/interactwithankush"><img src="https://avatars.githubusercontent.com/u/18613127?v=4?s=100" width="100px;" alt=""/><br /><sub><b>interactwithankush</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=interactwithankush" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/yuhangbin"><img src="https://avatars.githubusercontent.com/u/17566866?v=4?s=100" width="100px;" alt=""/><br /><sub><b>CharlieYu</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=yuhangbin" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Leisterbecker"><img src="https://avatars.githubusercontent.com/u/20650323?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Leisterbecker</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Leisterbecker" title="Code">💻</a></td>
<td align="center"><a href="http://rosaecrucis.cn"><img src="https://avatars.githubusercontent.com/u/35420129?v=4?s=100" width="100px;" alt=""/><br /><sub><b>DragonDreamer</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=castleKing1997" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/ShivanshCharak"><img src="https://avatars.githubusercontent.com/u/96943825?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ShivanshCharak</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ShivanshCharak" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/HattoriHenzo"><img src="https://avatars.githubusercontent.com/u/5141285?v=4?s=100" width="100px;" alt=""/><br /><sub><b>HattoriHenzo</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=HattoriHenzo" title="Code">💻</a></td>
</tr>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->

View File

@ -1,190 +0,0 @@
parent: half-sync-half-async; artifact: half-sync-half-async
Puml Server ID: RScv3SCm3030LU819FRPXg5fIm552tnYPFiyjRi3RkbAaYkdoQr5JBy369vrxz7oaSv6XmPhL3e6TCaJ0msU-CAoilTToyG8DdKOw5z0GzcAlvNAN_WZSD1brBHHPmxv0000
parent: abstract-document; artifact: abstract-document
Puml Server ID: PSjB3eCm34NHhPG599vtDyQn85L-ifzX-p3lxEf8Twj3MXGDQvyJMFubChxpKN767gucSq07iinEjSNDOACVNvoAUZr6MWoe3QVE_WRnxZ0Mf38b-hkIGlurX_MyehS7
parent: tolerant-reader; artifact: tolerant-reader
Puml Server ID: NSZ14SCm20NHLf829ExfXaYChGn26lZ4xSVdtFRjSrZJx9AkZnFOyI9olkenSEOxGxmjWnXgMvE6viLWfmz_kNI9SLZP38XRqEIuWx1Kd0t5XVjjGVj_DNtMdLD_
parent: event-driven-architecture; artifact: event-driven-architecture
Puml Server ID: TOhH3SCW30LNQGS0_tSRnrZ15H1adfFromBzkfFktZQaHT7mzgh0N1yYvoUVXXf7B7Mv1dGWozN9MZmCTlhopQdeidEaoO3wMDHvRI6zzvwAssPYbsfGGRYIGlxN7DxpZDv-
parent: publish-subscribe; artifact: publish-subscribe
Puml Server ID: PSZB3SCm203GLTe1RExT1XCKKs5YyMdMR--zFRsd66aTNAwFcRdZ1U1uzrDorgXWfykIBJjT2qJhnaI7Dtwm7HnoMjkOoMu12-C7s3LKOhQe4UGo63ZfVtlvwhkMVW40
parent: facade; artifact: facade
Puml Server ID: BSP15eCm20N0gxG7CEoz3ILKqvTW7dpq-hhehERTJ7fMJU-l7PYn4ZbVPMlOyvEXBeT13KMEGQtdnM2d7v-yL8sssJ8PKBUWmV64lYnSbHJoRqaVPUReDm00
parent: service-locator; artifact: service-locator
Puml Server ID: NSjB3iCm203HgxG7iDdtDeIWX0fZYqzo_MRTtUX9ynOZhPtBzNLchlW0EDxza3nhgs2dQScMdUO0qRenqU6B5xQTGmvh2pFPBM1WF07FSmbnqqcOqu6J_gsNZxvgw0y0
parent: dao; artifact: dao
Puml Server ID: 5SR14OKW30N0LhG0oVrt4o6ZE12Ov4NR_thQNQlc5aN2sd82qtz4naywAixOmyNoK8WYvT6fjdWOR7JnpLiHhuTkam4nTUhiRwZm847-J64zpUZj3m00
parent: model-view-presenter; artifact: model-view-presenter
Puml Server ID: ROlR3SGW3C1MkGu0-RzjKeXQJWcWFChwPO3xispvQBrmL0hbp-q-xGkWkFBL_8upZBICxjGzbo7GE1OwAlpmmLJ9sjNJH7VIRY1e6q169KvFevMcakrtI_BoD-HGoJE4Nm00
parent: observer; artifact: observer
Puml Server ID: FSkn4OGm30NHLg00hFow4KO3PcpP8tr1-pYwx6smQz5Suv2mkbp0y1-HyPlEWYlsSB7S5Q98kJSgDLu66ztyy7Q8brEtmO2OEZNs2Uhxl9u9GVv72cjfHAiV
parent: intercepting-filter; artifact: intercepting-filter
Puml Server ID: RSfB3i8m303Hgy014k-vZN5DQkIuaJ_q-fGzkz7JtCL8Q-DolUsPAnu0ZcSVadizAzZfi6JBJiS4qJenqU6D7smRXmnh2pFPBM1YN05o_KwyKcoqb-ZFEEcVz_BPLqtz0W00
parent: factory-method; artifact: factory-method
Puml Server ID: NSZB3G8n30N0Lg20n7UwCOxPP9MVx6TMT0zdRgEvjoazYeRrMmMsFuYChtmqr7Y6gycQq8aiQr3hSJ7OwEGtfwBUZfas0shJQR3_G2yMBFkaeQYha4B-AeUDl6FqBm00
parent: private-class-data; artifact: private-class-data
Puml Server ID: RShR3SCm243HLTe1RFwx3S4eeSB4uf6itmpGlwkZ-nOZhS7b-ZeoLtm07E--InwrLR3JQScMdSu9edLZeiCNBso3GtPh2pFPBM1YF07BvSBaHeeHRJm_SD8VxkMphvhw0m00
parent: async-method-invocation; artifact: async-method-invocation
Puml Server ID: TSdB3SCW303GLTe1mFTkunWhk0A3_4dKxTi5UdlIUuhIoCPfuz4Zjhy03EzwIlGyqjbeQR16fJL1HjuOQF362qjZbrFBnWWsTPZeFm3wHwbCZhvQ4RqMOSXIuA1_LzDctJd75m00
parent: execute-around; artifact: execute-around
Puml Server ID: NSZ14G8n20NGLhI0XBlT865suoGa0n_NylNixSsxTvEHJTF7xGHsF8YShtfqdFdCK9TbK4ELDQcFl1ZizE8tbwRH3okR0NKBcXm_a7vK4bhOLreZXVnLJPzrvnnV
parent: monostate; artifact: monostate
Puml Server ID: HSV14OGm20NGLjO23FVj1YEZsGaa0nzjVxrvUszfLdlkaju_9p3ZI-HybwFXp2r3l0w364eTIgtdpM2d7r-yxXBji7Ko86v1ol60TDW8C8G4zLr9rp9J-ny0
parent: thread-pool; artifact: thread-pool
Puml Server ID: JSV14SCW30J0Lk82GFzq8uF6a1624IUx_UIPt-xHhMXK2TTN0zP-4pa_-UfeSSOMBzCWXbpceAxnCDZfmpUdAhjVbXO3uhPfyFw1q5oufZMdag3yFuUFl6Be5m00
parent: delegation; artifact: delegation
Puml Server ID: JSV14GCX20NGLf82LkxfXbN69OFeu2VRVdBCxRsdUhLiac6F2rZxHHHybwwuyimjKQT37ANEGMfvCpZepHy-ccpjVYm697pJuFq3DJ7f39rEWlhNaZ7Aoc5V
parent: chain; artifact: chain
Puml Server ID: 9SR13SCm20NGLTe1OkxTXX0KKzd4Wa-pVYlrdTxJN4OTMZ4U7LZv8Wg-ssdejLTgoELGHvDhaesw6HpqvWzlXwQTlYq6D3nfSlv2qjcS5F9VgvXjrHnV
parent: resource-acquisition-is-initialization; artifact: resource-acquisition-is-initialization
Puml Server ID: ZShR3S8m343HLUW0YV_PnhXMQvGumOzMOdhA1lqxkhgBABLSEQqzzeZfJm33isuIUxxIsMXei4QbqK5QdXXeyCO3oyekcvQ94MpgqD4lWB6FDEA2z4bn2HbQn8leHMponNy13hgvrhHUP_Rs0m00
parent: fluentinterface; artifact: fluentinterface
Puml Server ID: NOj93eCm302_KXv0VEzlN6F0bMCYB_3zvjpRQ3IpY97MnkNwEZD7l04SdtP8dlMfOAVBaYqRNHr4wy54Xo_Uk6uSSjWwC9FT0Zh61DYrPY_pyXs9WPF-NIllRLJN7m00
parent: service-layer; artifact: service-layer
Puml Server ID: LOl93SCm3C1MQGUmzUysgY8aAcJ5q96WszVV_aW2V8gHriRb-ZWoPxm07E--Inxrhc2dqv8jEvq3HEl6H8SFNjWs3jcjJSnaju21iG3MSmbnK_mkuwJ_qij7dpNq1m00
parent: visitor; artifact: visitor
Puml Server ID: DSR14OGm20NGLhG0mtsxmSWeJa8oyD7sTo_xJczLgoqFIM_B1Spu43c_vLHSkMU8rs4GGwcZaxPy6UnqyyFR8Q6dRPC1SGlg7B_Gew4OJeBwVqdlPMPlNm00
parent: double-dispatch; artifact: double-dispatch
Puml Server ID: NSbB3iCW303HgpG70Ezx6yTOWSeOv4zp_MRTtUZDCPGa6wV9gqTiVmCOtlKQqVDCPwEbmHgLreGXUMEWmGU_M1hxkBHiZ61JXud-1BILft1fmvz37JZetshQh3kd_000
parent: monad; artifact: monad
Puml Server ID: 9SR13SCm20NGLPe1OkxTXjWeSMMm1Pza_LRgExsjMntP97syBc35cyZvAMV7bKU6U9q6CPGwbVh8Xy5E7xvvRnBzj7qn86v1ol4BwJHk9AZ_bNGjAtLy0G00
parent: front-controller; artifact: front-controller
Puml Server ID: PSlB3OGm303HLfO24j-t6nCC13bEvC_IFk6yjz6JPgbIE3OAvS_fFkmBe7Zde_ePQnXfwU8adajlK3bkT5Iuy8Tf8wk7f87kf6BGq6R0hlD8xwQTUG9v-SCSslA8nWy0
parent: strategy; artifact: strategy
Puml Server ID: FSV13OCm30NGLM00udktCS4AGOaJsTz5tRwSkBstLiqj3WbhombC_n0PtwbKdB67Y-MX44NAerDjSJFOwE8lRuTuBRfD1iJKgRC_88SnfFn8aD-ai9vczFO7
parent: command; artifact: command
Puml Server ID: DSgn4OCm30NGLM00h3xR25i7vYpXaxx2-g59zugtTgiZcwIFvGHcV8YSdt9qdBbdYDVR88PIRwK-yc6mqyLVtff4FsoR38XRa7Aye3SgMoD1_RkaQvcfumS0
parent: abstract-factory; artifact: abstract-factory
Puml Server ID: PSZB3OD034NHLa81Czwd6sCC39gVxEUWT1_ssLmTtQLqgR5fM7sTmFGtaV6TZu8prd0r6HtQaMKqAZLk1XjT_E6qgPUZfyc0MdTgx0-8LuUn8ErFXdr98NypXxKyezKV
parent: flux; artifact: flux
Puml Server ID: 7SP14eCm20NGg-W13FlU1YFLE0GpyAazVZk-rPkRLSrDqdKwW14l8kUxx0r7hXdYzJA8eTIhKzEy6UnqyeUNJQBjjWm6n2seS_n3Ryql2UgJajxBoAu_
parent: event-aggregator; artifact: event-aggregator
Puml Server ID: PSf13iCW30NHgxG70Ezx6uTOX0eCih-JwvTzTwEdUJSjFKu9wwyBMFuXCdvoRRZY21ShKo6ANEQWrkDXiD6NRqwdUAkQ5WDYwZJOTv3SUqzSgqbbp0qeVvZ3Hbun-Wy0
parent: singleton; artifact: singleton
Puml Server ID: HSV14SCm20J0Lk82BFxf1ikCh0n26ZZizfDVVhjRjwfvIhg-Bc35cyZvAQtZoYD3l4w364gTWxhcms2d3z-ydnAzsRuO4BUWmV43HRUcWcaagF-Lz55M3lq2
parent: null-object; artifact: null-object
Puml Server ID: JSV14SCm20J0Lk829Fxf1cF6bWSX3JhYzfDdVhjRSx4yDCDU5p3NcoZugMV3bNik3HaETLGPdPhbm-2WcpzS3btjz38PqF15dTSFv6bMndwhW1Jo_vhHwynkNm00
parent: multiton; artifact: multiton
Puml Server ID: FST14i8m20NGg-W16lRUXgPCYnD81Zxs-hfozzvJlOywf68yBc3bYoZuRgVYghrIea-7E5gVHZhgPd3Gcp-y7P9w-hOOaF0au_o1h0OKqqdG_saLrbRP-080
parent: composite; artifact: composite
Puml Server ID: HSf13eCm30NHgy01YFUzZGaM62LEP7-NwvTTT_EaMTLgoqFIst81Cpv4payv5LVk6U9r6CHGwkYaBHy6EztyvUsGqDEsoO2u1NMED-WTvmY5aA3-LT9xcTdR3m00
parent: api-gateway; artifact: image-microservice
Puml Server ID: 3Sp13SCm2030LTe1RFxTXX3aK1biOOZLxPlVlUujHZrFJk-lAsAk3u3ZhatYoYCNEmqBjgWq5AJdna27BzvOJbxIh4oCOBS5Yki1u9JIC7ZZ3pW8HB5nKI4VJtSBSKtNEbFx7m00
I dont want to program this, just add the following lines to the README.md file that corresponds to this puml file 'api-gateway/etc/image-microservice.urm.puml'
pumlid: 3Sp13SCm2030LTe1RFxTXX3aK1biOOZLxPlVlUujHZrFJk-lAsAk3u3ZhatYoYCNEmqBjgWq5AJdna27BzvOJbxIh4oCOBS5Yki1u9JIC7ZZ3pW8HB5nKI4VJtSBSKtNEbFx7m00
parent: api-gateway; artifact: api-gateway-service
Puml Server ID: JSox3SCm303HLP819FRUXg49cO542_nOyFPncUvUSszHwhbpMdyT4TCt0CDLcyIHdtGsEZLOez8vG7ek33JuueLbPvUcPM84cpeCz2S0fvI6mGjluA1_b-Tt2N5D6tNcw3y0
I dont want to program this, just add the following lines to the README.md file that corresponds to this puml file 'api-gateway/etc/api-gateway-service.urm.puml'
pumlid: JSox3SCm303HLP819FRUXg49cO542_nOyFPncUvUSszHwhbpMdyT4TCt0CDLcyIHdtGsEZLOez8vG7ek33JuueLbPvUcPM84cpeCz2S0fvI6mGjluA1_b-Tt2N5D6tNcw3y0
parent: api-gateway; artifact: price-microservice
Puml Server ID: 3Sn13iGW243HgqmFeEpdDfGIoqJK8DJqzkFklyq_f56DYyFgvtOVymjWk78Hl-ECoKQzEJVFr1Mana97Wny-c2wUKbeQwCxM9YZE7O13Ka7dXI-m4mmJugH2rlVksSXXcaTe_GC0
I dont want to program this, just add the following lines to the README.md file that corresponds to this puml file 'api-gateway/etc/price-microservice.urm.puml'
pumlid: 3Sn13iGW243HgqmFeEpdDfGIoqJK8DJqzkFklyq_f56DYyFgvtOVymjWk78Hl-ECoKQzEJVFr1Mana97Wny-c2wUKbeQwCxM9YZE7O13Ka7dXI-m4mmJugH2rlVksSXXcaTe_GC0
parent: object-pool; artifact: object-pool
Puml Server ID: JSV94SCm2030Lk829Fxf1cF6bWU1XYDkFtdcjxiD9Qc3o-LrPQvu0pW-_HnvrLx1JgR9cfrimf1wCD7XnW-sWsESsXPcicl0nFW1RB-PiYqp0KxwVo-VVTMKBm00
parent: adapter; artifact: adapter
Puml Server ID: DSR14S8m30J0Lg20M7-wEMnDOiPMFDA9j0yyUEtUkzMHJTF7xI1NF4GSLzaxZtncgDVJgCPIpobzv0N2vOKtjgRHTziMI7KBcOXl10thfxB-Nz9dMJd71m00
parent: hexagonal; artifact: hexagonal
Puml Server ID: HSTB4W8X30N0g-W1XkozpPD90LO8L3wEnzUTk-xxq2fvSfhSUiJs1v7XAcr4psSwMrqQh57gcZGaBmICNdZZEDb7qsCZWasT9lm7wln1MmeXZlfVIPjbvvGl
parent: value-object; artifact: value-object
Puml Server ID: LSZ13SCm20NGLTe1RExTXX2KECBOmfza_VRQszDxDnVBNJFiTG9pVOY2dteqdBdbqf3XK4ULqQbPFWmEklZcikjgXvV9W8Olwhn-e9ijjOpjKW4fv2zgHgypktq1
parent: twin; artifact: twin
Puml Server ID: 7SR13OCm30NGLUW0n7UsCS42eyH4zdUpFbNVwNtKQij3qjjo0ICs8kTPJiMLUuPuVGnYAFNff2qdWvrk_l9wIEXfws10t88wno-4gKQ2-az9xsLaRoy0
parent: semaphore; artifact: semaphore
Puml Server ID: HSV14SCm20J0Lk82BFxf1ikCfOn06ZZizfDVVhjRjphobFJnQi2ADv7pKwwEbaU6U9q6CPGwbVh8Xy5E7xvvFoNwPVjYGDo2bEC72b5URRgGeFvNqhMirF45
parent: message-channel; artifact: message-channel
Puml Server ID: NSZB3SCm203GLTe1RExTXX1akm9YyMdMRy-zFRtdCf8wkLmUCtF72y3nxcFbhAE2dIvBjknqAIof6nCTtlZ1TdAiOMrZ9hi5ACOFe1o1WnjDD6C1Jlg_NgvzbyeN
parent: poison-pill; artifact: poison-pill
Puml Server ID: JSZ14SCm20NHLf82BExfXiYCJGOX3NpYzkDZRllsgTwjTgcmnmciV145N-rGdFMkbEZJ8OxMvo2rkXWSzE4lRxka7huj1YGyQN3UGMjgpdkh6Gdwlrl5QAk6_G00
parent: aggregator-microservices; artifact: aggregator-service
Puml Server ID: JOov3SCm301NIGQGs7iRXYPa1g8ayB7NjuiKwGvtmBrbKC-Tq_hhY5Y-0HXUjKaS-Kbdepc2HrIQ2jBpma23BvvOTdPfeooCO1iEYlu0O6l63MDQKI6Rp-CKOWSE-ey_NzEqhjH-0m00
I dont want to program this, just add the following lines to the README.md file that corresponds to this puml file 'aggregator-microservices/etc/aggregator-service.urm.puml'
pumlid: JOov3SCm301NIGQGs7iRXYPa1g8ayB7NjuiKwGvtmBrbKC-Tq_hhY5Y-0HXUjKaS-Kbdepc2HrIQ2jBpma23BvvOTdPfeooCO1iEYlu0O6l63MDQKI6Rp-CKOWSE-ey_NzEqhjH-0m00
parent: aggregator-microservices; artifact: information-microservice
Puml Server ID: LSnB3i8m303Hgy016k-vZN5DQXGxaJ_jzUcMtKXFcgSOZTgvV3oEp1Kl0CUhTScZtXNiD2tPij5Ka54N9ZfyySHjvv1ksy9CTWjGZ3i0UtVkcDCt5V9vFquX3k0a4FjCLqoPzgUjNDig7Jy0
I dont want to program this, just add the following lines to the README.md file that corresponds to this puml file 'aggregator-microservices/etc/information-microservice.urm.puml'
pumlid: LSnB3i8m303Hgy016k-vZN5DQXGxaJ_jzUcMtKXFcgSOZTgvV3oEp1Kl0CUhTScZtXNiD2tPij5Ka54N9ZfyySHjvv1ksy9CTWjGZ3i0UtVkcDCt5V9vFquX3k0a4FjCLqoPzgUjNDig7Jy0
parent: aggregator-microservices; artifact: inventory-microservice
Puml Server ID: LSpB3G8n303HLg20ZUzqOxnMrYXn8d-oedjovJRIIEyfIYrFJckFAsBw2y3mBbNYodSw6mqDrYWqEaZB6mCDFhZmEDcbwZ4nWaqTEleEm5gDAyQmemlPsCOIOWSE0j6riM7VlrVIUfdPsmy0
I dont want to program this, just add the following lines to the README.md file that corresponds to this puml file 'aggregator-microservices/etc/inventory-microservice.urm.puml'
pumlid: LSpB3G8n303HLg20ZUzqOxnMrYXn8d-oedjovJRIIEyfIYrFJckFAsBw2y3mBbNYodSw6mqDrYWqEaZB6mCDFhZmEDcbwZ4nWaqTEleEm5gDAyQmemlPsCOIOWSE0j6riM7VlrVIUfdPsmy0
parent: bridge; artifact: bridge
Puml Server ID: BSR14SCm20J0Lf82BFxf1akCJ4R26ZZYzkE7zxLljJgoIVfu7S2A3v7pLRhYo3r3l9u6CPHwJjAH5uETllpZhKbejsqn86v1a-CExQwj2mdgqv8-oyev_W00
parent: servant; artifact: servant
Puml Server ID: DSkn4O0m20NGLNG0G-ys63cDbv0SV7HzRUnUy-QYkSOkONKwWU4haV6JZe8pjd2nt1MYIBatAZKU1XjTVFEoYvT3by60c3erzW_qdPiL9CY_KrXB8rfz0G00
parent: lazy-loading; artifact: lazy-loading
Puml Server ID: LSXB3W8X303Gg-W1e7jlqu66gIc5zED4JwzRTo_lpjeaEwN9xOpO_W0mlEhWEFD89sjBWpHgMnDOyi90WoU-i7Ho7besHf2fmqJ_0GG_xo8BE-i0YlONDMtMdLE-
parent: flyweight; artifact: flyweight
Puml Server ID: HSV94S8m3030Lg20M7-w4OvYAoCh7Xtnq3ty-Eq-MQlaJcdow17JNm26gpIEdkzqidffa4Qfrm2MN1XeSEADsqxEJRU94MJgCD1_W4C-YxZr08hwNqaRPUQGBm00
parent: mutex; artifact: mutex
Puml Server ID: 9SR13OCm30NGLSe0n7UsCS62LB69x6zWV2hrdTxKhFRS9Br_3c34GkHybxtXo3L3l9u6CPHwAhMUDuETldpnl4cqtUR1WBW5ASSlf0bvI53_A-bQHcf_0G00
parent: mediator; artifact: mediator
Puml Server ID: FSV14SCm20J0Lk82BFxf1akCJKOW3JhizfDNVhkRUktP9AE_Bc2kDr7mKqx5bKSkYJeSuYXr66dFXy517xvvRxBqz7qo8E6BZDSFPDAKCO84zP-IOMMczIy0
parent: page-object; artifact: page-object
Puml Server ID: JSV14OGW30NGLjO28FVj9iOCua1Wme-sxnxtzjvMJLeS6ju-9p3NbyZvoQNYZ3sMkWo36hACJhN5ms2dYszEXwvQB4q6r6rHv_K3JIwQndwfW1Jo_npUyupUNW00
parent: factory-kit; artifact: factory-kit
Puml Server ID: JST15i8m20N0g-W14lRU1YcsQ4BooCS-RwzBTpDNSscvQKQx7C1SDwBWi-w68--vD6Gur55bTBAM9uE3dlpcikcotSjaGCCNTLu_q8C58pxbPI25_Bzcz3gpjoy0
parent: property; artifact: property
Puml Server ID: FSV13OCm30NGLTe1YEziumOBKYMEPN-3s9wUUdlltRJst2Izlmx0OYLolihUSEGdGxnEXIXAdODQpul1Jby-UTaasgwBCI2kGOFZ1pAV9ewR1FMVaZwAvUWF
parent: dependency-injection; artifact: dependency-injection
Puml Server ID: RSdB3SCW303GLPe1mFTkunWhSGG6-PEesxS3zFQajubIpyPf_NL6B7y363xra3XpJsUZgS4QbUO0wVbWeC65DvR6BeUMXH5iwZ3GVu36YxMnqgU8NamXKu63_aPD6tNbw5y0
parent: layers; artifact: layers
Puml Server ID: BSR13OCm30NGLSe0n7UsCS62L8w9x6yGszD3t-bDpQhc9kdwEO0H2v7pNVQ68zSCyNeQn53gsQbftWns-lB5yoRHTfi70-8Mr3b-8UL7F4XG_otflOpi-W80
parent: producer-consumer; artifact: producer-consumer
Puml Server ID: PSjB3iCW303HgxG70Ezx6zTO2HKso9_a-c7VtUX9y-vA8nkdZTSPiVm3O7ZNeyUPttGscXgiKMaAz94t1XhyyCBIsFkXPM44cpe8-WvODbiIMzcdfspXe7-jQL9NodW0
parent: builder; artifact: builder
Puml Server ID: DSR94O0m2030LhG0mzzkC64KXs26GzlNZw_TcRLADagJwOWOlW8OFcNdE79B9wkN1ccKUdLWoGS33KwySMdalEioC89C7Jhw5zYIfNrIrFybhPUHNLu0
parent: specification; artifact: specification
Puml Server ID: LSX14i8m20NGg-W16lRU1YcsE0d9mCTUNxVkthoxkVJQjQBVJc3bWoZuQeVXh6UbXao7EfhCGTRhOd3Gcp-yxPfs-BOOqF2amVa3vLAnbmd3ffD2_gTLZBPgz2y0
parent: state; artifact: state
Puml Server ID: 9SRH3O0m20N0LNG0ox_RO2LQqz867hg-9jxNpKLpZLt2wdG2mrSYuoST1MTiuMAvAqIHSczKQZmCDhhuvcKNBuSkWm4nTMhiNyZ141BaVocifH6jlW00
parent: reader-writer-lock; artifact: reader-writer-lock
Puml Server ID: RSZB4S8m303HLg00MtUw4R8cCP5bZpwuVL80jttxx4gIZTFaSKOiVm4OxdhqEFETpaPJWpKgpG5TScEWmGU_M1fxFxGiZ61JXu5-1nXZOolR-gqYaoxWe3-xfeswSiWF
parent: interpreter; artifact: interpreter
Puml Server ID: JSf13eCm30NHgz034E-vZGaM62Kcih_BzQ6xxjv8yr6hBJT9RzC1Z5Y8dE-oAuvSCyJhPH13gLSdRNapsEdaBy-RXEus3mR4BQXpl21zVnykFmlgVvVqNaRszW00
parent: template-method; artifact: template-method
Puml Server ID: NSZ13SCW30NGLPe1mFTkuu0Lg6n0vZjPlpttzlIEFef6bN1zDM3jDv7paw-E5cTiyJ87P22NQTGr7WOxVVZcL6NtQwJ5WFZOPBn_88WjPKWoGPkL1EN_ShZb5QPV
parent: feature-toggle; artifact: feature-toggle
Puml Server ID: NSZ14G8X30NGLhG0oDrk8XjPd12OvCTjNy_UthpxiAPvIBhUJc37WyZvgdtWp6U6U5i6CTIs9WtDYy5ER_vmEIH6jx8P4BUWoV43lOIHBWMhTnKIjB-gwRFkdFe5
parent: business-delegate; artifact: business-delegate
Puml Server ID: POl13SCm3CHMQGU8zUysgYCuBcJ5a4x9-l6_Fu84tzsgvYxf-Zg06HyYvxkqZYE_6UBrD8YXr7DGrxmPxFJZYxTTeZVR9WFY5ZGu5j2wkad4wYgD8IIe_xQaZp9pw0C0
parent: naked-objects; artifact: naked-objects-integtests
Puml Server ID: LSmn4iCW30NHgoG70FMvZGmQ6ni48tt5ru_RT3kls7VJqgDAM7yTmF8FaV6TzuOZjd2nCXMYo6KEQZrk1XkT_ELKnTkkQJ4Wfaw3_GbIlgIckPrIu2Ge_vBQyziX3izX8wyO_GS0
I dont want to program this, just add the following lines to the README.md file that corresponds to this puml file 'naked-objects/etc/naked-objects-integtests.urm.puml'
pumlid: LSmn4iCW30NHgoG70FMvZGmQ6ni48tt5ru_RT3kls7VJqgDAM7yTmF8FaV6TzuOZjd2nCXMYo6KEQZrk1XkT_ELKnTkkQJ4Wfaw3_GbIlgIckPrIu2Ge_vBQyziX3izX8wyO_GS0
parent: naked-objects; artifact: naked-objects-dom
Puml Server ID: LSZ94SCW3030Lf82G7zt8mkDZOC4eyDkF_dcjxFlhZIoSTfudH7BDm33fnuzpjpJsMXgi4QbAT17FXXeSE6DfR7tGyl223Pr4FGVGF73hSpzOWe73lgVqgRKDAahPNm1
I dont want to program this, just add the following lines to the README.md file that corresponds to this puml file 'naked-objects/etc/naked-objects-dom.urm.puml'
pumlid: LSZ94SCW3030Lf82G7zt8mkDZOC4eyDkF_dcjxFlhZIoSTfudH7BDm33fnuzpjpJsMXgi4QbAT17FXXeSE6DfR7tGyl223Pr4FGVGF73hSpzOWe73lgVqgRKDAahPNm1
parent: naked-objects; artifact: naked-objects-fixture
Puml Server ID: LSX15i8W30N0g-W187jlaq9igH1uoO_r-BfrDs_kJKkFAc7zTW3B7qJ6LzuRZjZ2nSfKY2ANEQZrk1XiTFARKnLlkwR5W9Ww3VOVIFabDStjb08dGVcVz6mVX4aE6td5w5y0
I dont want to program this, just add the following lines to the README.md file that corresponds to this puml file 'naked-objects/etc/naked-objects-fixture.urm.puml'
pumlid: LSX15i8W30N0g-W187jlaq9igH1uoO_r-BfrDs_kJKkFAc7zTW3B7qJ6LzuRZjZ2nSfKY2ANEQZrk1XiTFARKnLlkwR5W9Ww3VOVIFabDStjb08dGVcVz6mVX4aE6td5w5y0
parent: model-view-controller; artifact: model-view-controller
Puml Server ID: ROl13SCm201NQGUm-NSRQgE42h258Lw_wR-_qvtkoTOaEwNBuuoOwmNWkEl1SUOx5taR5cHHsr1WoOs13X-yi7HQV5YP645k2nJN3Q2ZavIBQPVVwqFajXJjVwdfMcUgV040
parent: proxy; artifact: proxy
Puml Server ID: 9SR13OCm30NGLM00udktCS62eCI9x6yesrEfx_Jcehd69c5rEe3X7oBZE-q5HwpXOhahH95oRrHgt0msEldYPHClkow30J5rQko_qB3-VKYG_qjXBOrezGK0
parent: memento; artifact: memento
Puml Server ID: DSgn4OCm30NGLM00h3xR2AC3SvRiaxx2-g59zugtDgiz3qdlomNC-10vF-Lik7BF4A_388PIXrBh-J3OwUOlRuT4EssR38XRa7Ay81Lz_o11_RkaQvcf_GS0
parent: decorator; artifact: decorator
Puml Server ID: HSV14SCm20J0Lk82BFxf1YF6LaP26ZZizfDVVhjRC-bPDRs_Bc35cyZvAMV3bKU6kao36ehCGQtdms2d3z-yLursshuOKBUWmV43LPNfZEcaaFzA-YWhH_y2
parent: data-mapper; artifact: data-mapper
Puml Server ID: JShB3OGm303HLg20nFVjnYGM1CN6ycTfVtFSsnjfzY5jPgUqkLqHwXy0mxUU8wuyqidQ8q4IjJqCO-QBWGOtVh5qyd5AKOmW4mT6Nu2-ZiAekapH_hkcSTNa-GC0
parent: caching; artifact: caching
Puml Server ID: DSRB4OKm2030LhG0m_rrWyWaE0bc-6ZxpujxsbMKUXwSrfSMCVq7OFYKAj5oJsUZIuCr2bq3fEU3WGOdthWTx59rcnZ1fWu3_GqGKXEjm47VIzeeCqV_0m00
parent: reactor; artifact: reactor
Puml Server ID: DSR14OGm20NGLjO23FVj1f7Hx2Ga0nzjVxtuJc-f9YrtJM-V4vZn9NA-or5nvfQXBiEWXYAZKsrvCzZfnnUlkqOzR9qCg5jGvtX2hYmOJWfvNz9xcTdR7m00
parent: iterator; artifact: iterator
Puml Server ID: FSV13OGm30NHLg00uljsOu85HeaJsTzB-yjfBwCtgrfjUKXwMovWneV8-IcduiezGxmEWnXA7PsqvSDWfvk_l1qIUjes6H2teCxnWlGDOpW9wdzAUYypU_i1
parent: callback; artifact: callback
Puml Server ID: FSVB4S8m30N0Lg20M7UwUL4qYOciUFGXxSE9s-wp6sjjKgwF8tF6YyXnjxtdKMk5E5-MOjdu6jIrRYIStlXWsIJwRij4fhW53SGFn51TmIT9yZ-jVBHPGxy0
parent: repository; artifact: repository
Puml Server ID: JSV13OCm30NGLM00udktCS42eyI9xE-YRjyUUtjlLQij3qblomNCU14vF-LKNBbdYDTX44EfevEsV1ZiTFERjqD2Jzic0-8Mr3b-89SvGZ7yGuBwrvBUoypUlW00
parent: mute-idiom; artifact: mute-idiom
Puml Server ID: JSf13iCm20NHgxG7iDdtDjH62PKX5luarq-MtSsJvgtUHdR96AyTcEj357pLJR7dDvT4EnpYgEqmqf4NWuD-V7BfidJpCXcGy4N6wmcoX1Jj-lo2ziUQONMcZHi0
parent: prototype; artifact: prototype
Puml Server ID: HSV13OCm30NGLM00udktCS62eCInxE-YRj_UUdjlRLfx7fBUbmkmU14vF-Lik7BF4AzJ8OfIvw3Mys6mqyrltWw9Tkfc38XhqE3uWSmd9Zuc9AZ_bVHHB4V_0W00
parent: step-builder; artifact: step-builder
Puml Server ID: LOZ93SCm3C1MQGQmzUysYYqaAcJ5q96i7t_x8KXkh4soKvfypeZfNm33fnuSP-xfPEtI88tQhW4i-M2WmGzlB9sS3oqJ8yZKOQ0lWOLPzcJfAoZQtwXfeyuSyW80
parent: double-checked-locking; artifact: double-checked-locking
Puml Server ID: TSdH4SCW203GLTe1bFzkGv1J6qGFeLc_MI1_x-wzkv94uJ1vDVUrFm26LwxTMnonsMYgitgcEQ1BNEXeyCKVfiAxLqqBtTbqmy1z0ygCGpXHOpgv99bqTgt0JW-LmqPUCUGF

View File

@ -1,67 +0,0 @@
#
# The MIT License
# Copyright (c) 2014-2016 Ilkka Seppälä
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
import requests, glob, re, os
# taken from here: http://stackoverflow.com/a/13641746
def replace(file, pattern, subst):
# Read contents from file as a single string
file_handle = open(file, 'r')
file_string = file_handle.read()
file_handle.close()
# Use RE package to allow for replacement (also allowing for (multiline) REGEX)
file_string = (re.sub(pattern, subst, file_string))
# Write contents to file.
# Using mode 'w' truncates the file.
file_handle = open(file, 'w')
file_handle.write(file_string)
file_handle.close()
# list of all puml files
fileList = glob.glob('*/etc/*.puml')
for puml in fileList:
pathSplit = puml.split("/")
# parent folder
parent = pathSplit[0]
# individual artifact/project name
artifact = pathSplit[2].replace(".urm.puml", "")
print "parent: " + parent + "; artifact: " + artifact
# do a POST to the official plantuml hosting site with a little trick "!includeurl" and raw github content
data = {
'text': "!includeurl https://raw.githubusercontent.com/iluwatar/java-design-patterns/master/" + puml
}
r = requests.post('http://plantuml.com/plantuml/uml', data=data)
pumlId = r.url.replace("http://plantuml.com/plantuml/uml/", "")
# the only thing needed to get a png/svg/ascii from the server back
print "Puml Server ID: " + pumlId
# add the id so jekyll/liquid can use it
if (parent == artifact):
replace("./" + parent + "/README.md", "categories:", "pumlid: {}\\ncategories:".format(pumlId))
else:
print "I dont want to program this, just add the following lines to the README.md file that corresponds to this puml file '" + puml + "'\npumlid: {}".format(pumlId)

View File

@ -3,30 +3,189 @@ layout: pattern
title: Abstract Document
folder: abstract-document
permalink: /patterns/abstract-document/
pumlid: PSjB3eCm34NHhPG599vtDyQn85L-ifzX-p3lxEf8Twj3MXGDQvyJMFubChxpKN767gucSq07iinEjSNDOACVNvoAUZr6MWoe3QVE_WRnxZ0Mf38b-hkIGlurX_MyehS7
categories: Structural
language: en
tags:
- Java
- Difficulty-Intermediate
- Extensibility
---
## Intent
Achieve flexibility of untyped languages and keep the type-safety
![alt text](./etc/abstract-document-base.png "Abstract Document Base")
Use dynamic properties and achieve flexibility of untyped languages while keeping type-safety.
## Explanation
The Abstract Document pattern enables handling additional, non-static properties. This pattern
uses concept of traits to enable type safety and separate properties of different classes into
set of interfaces.
Real world example
> Consider a car that consists of multiple parts. However we don't know if the specific car really has all the parts, or just some of them. Our cars are dynamic and extremely flexible.
In plain words
> Abstract Document pattern allows attaching properties to objects without them knowing about it.
Wikipedia says
> An object-oriented structural design pattern for organizing objects in loosely typed key-value stores and exposing
the data using typed views. The purpose of the pattern is to achieve a high degree of flexibility between components
in a strongly typed language where new properties can be added to the object-tree on the fly, without losing the
support of type-safety. The pattern makes use of traits to separate different properties of a class into different
interfaces.
**Programmatic Example**
Let's first define the base classes `Document` and `AbstractDocument`. They basically make the object hold a property
map and any amount of child objects.
```java
public interface Document {
Void put(String key, Object value);
Object get(String key);
<T> Stream<T> children(String key, Function<Map<String, Object>, T> constructor);
}
public abstract class AbstractDocument implements Document {
private final Map<String, Object> properties;
protected AbstractDocument(Map<String, Object> properties) {
Objects.requireNonNull(properties, "properties map is required");
this.properties = properties;
}
@Override
public Void put(String key, Object value) {
properties.put(key, value);
return null;
}
@Override
public Object get(String key) {
return properties.get(key);
}
@Override
public <T> Stream<T> children(String key, Function<Map<String, Object>, T> constructor) {
return Stream.ofNullable(get(key))
.filter(Objects::nonNull)
.map(el -> (List<Map<String, Object>>) el)
.findAny()
.stream()
.flatMap(Collection::stream)
.map(constructor);
}
...
}
```
Next we define an enum `Property` and a set of interfaces for type, price, model and parts. This allows us to create
static looking interface to our `Car` class.
```java
public enum Property {
PARTS, TYPE, PRICE, MODEL
}
public interface HasType extends Document {
default Optional<String> getType() {
return Optional.ofNullable((String) get(Property.TYPE.toString()));
}
}
public interface HasPrice extends Document {
default Optional<Number> getPrice() {
return Optional.ofNullable((Number) get(Property.PRICE.toString()));
}
}
public interface HasModel extends Document {
default Optional<String> getModel() {
return Optional.ofNullable((String) get(Property.MODEL.toString()));
}
}
public interface HasParts extends Document {
default Stream<Part> getParts() {
return children(Property.PARTS.toString(), Part::new);
}
}
```
Now we are ready to introduce the `Car`.
```java
public class Car extends AbstractDocument implements HasModel, HasPrice, HasParts {
public Car(Map<String, Object> properties) {
super(properties);
}
}
```
And finally here's how we construct and use the `Car` in a full example.
```java
LOGGER.info("Constructing parts and car");
var wheelProperties = Map.of(
Property.TYPE.toString(), "wheel",
Property.MODEL.toString(), "15C",
Property.PRICE.toString(), 100L);
var doorProperties = Map.of(
Property.TYPE.toString(), "door",
Property.MODEL.toString(), "Lambo",
Property.PRICE.toString(), 300L);
var carProperties = Map.of(
Property.MODEL.toString(), "300SL",
Property.PRICE.toString(), 10000L,
Property.PARTS.toString(), List.of(wheelProperties, doorProperties));
var car = new Car(carProperties);
LOGGER.info("Here is our car:");
LOGGER.info("-> model: {}", car.getModel().orElseThrow());
LOGGER.info("-> price: {}", car.getPrice().orElseThrow());
LOGGER.info("-> parts: ");
car.getParts().forEach(p -> LOGGER.info("\t{}/{}/{}",
p.getType().orElse(null),
p.getModel().orElse(null),
p.getPrice().orElse(null))
);
// Constructing parts and car
// Here is our car:
// model: 300SL
// price: 10000
// parts:
// wheel/15C/100
// door/Lambo/300
```
## Class diagram
![alt text](./etc/abstract-document.png "Abstract Document Traits and Domain")
## Applicability
Use the Abstract Document Pattern when
* there is a need to add new properties on the fly
* you want a flexible way to organize domain in tree like structure
* you want more loosely coupled system
* There is a need to add new properties on the fly
* You want a flexible way to organize domain in tree like structure
* You want more loosely coupled system
## Credits
* [Wikipedia: Abstract Document Pattern](https://en.wikipedia.org/wiki/Abstract_Document_Pattern)
* [Martin Fowler: Dealing with properties](http://martinfowler.com/apsupp/properties.pdf)
* [Martin Fowler: Dealing with properties](http://martinfowler.com/apsupp/properties.pdf)
* [Pattern-Oriented Software Architecture Volume 4: A Pattern Language for Distributed Computing (v. 4)](https://www.amazon.com/gp/product/0470059028/ref=as_li_qf_asin_il_tl?ie=UTF8&tag=javadesignpat-20&creative=9325&linkCode=as2&creativeASIN=0470059028&linkId=e3aacaea7017258acf184f9f3283b492)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,58 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<class-diagram version="1.1.9" icons="true" automaticImage="PNG" always-add-relationships="false" generalizations="true"
realizations="true" associations="true" dependencies="false" nesting-relationships="true" router="FAN">
<interface id="1" language="java" name="com.iluwatar.abstractdocument.Document" project="design-patterns"
file="/design-patterns/src/com/iluwatar/abstractdocument/Document.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="249" y="405"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<class id="2" language="java" name="com.iluwatar.abstractdocument.AbstractDocument" project="design-patterns"
file="/design-patterns/src/com/iluwatar/abstractdocument/AbstractDocument.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="250" y="237"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="3" language="java" name="com.iluwatar.abstractdocument.domain.Car" project="design-patterns"
file="/design-patterns/src/com/iluwatar/abstractdocument/domain/Car.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="108" y="75"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="4" language="java" name="com.iluwatar.abstractdocument.domain.Part" project="design-patterns"
file="/design-patterns/src/com/iluwatar/abstractdocument/domain/Part.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="400" y="76"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<generalization id="5">
<end type="SOURCE" refId="4"/>
<end type="TARGET" refId="2"/>
</generalization>
<realization id="6">
<end type="SOURCE" refId="2"/>
<end type="TARGET" refId="1"/>
</realization>
<generalization id="7">
<end type="SOURCE" refId="3"/>
<end type="TARGET" refId="2"/>
</generalization>
<classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</classifier-display>
<association-display labels="true" multiplicity="true"/>
</class-diagram>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View File

@ -1,91 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<class-diagram version="1.1.9" icons="true" automaticImage="PNG" always-add-relationships="false" generalizations="true"
realizations="true" associations="true" dependencies="false" nesting-relationships="true" router="FAN">
<interface id="1" language="java" name="com.iluwatar.abstractdocument.Document" project="design-patterns"
file="/design-patterns/src/com/iluwatar/abstractdocument/Document.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="341" y="376"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<interface id="2" language="java" name="com.iluwatar.abstractdocument.domain.HasModel" project="design-patterns"
file="/design-patterns/src/com/iluwatar/abstractdocument/domain/HasModel.java" binary="false" corner="BOTTOM_RIGHT">
<position height="81" width="173" x="41" y="194"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<interface id="3" language="java" name="com.iluwatar.abstractdocument.domain.HasPrice" project="design-patterns"
file="/design-patterns/src/com/iluwatar/abstractdocument/domain/HasPrice.java" binary="false" corner="BOTTOM_RIGHT">
<position height="81" width="175" x="254" y="194"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<interface id="4" language="java" name="com.iluwatar.abstractdocument.domain.HasParts" project="design-patterns"
file="/design-patterns/src/com/iluwatar/abstractdocument/domain/HasParts.java" binary="false" corner="BOTTOM_RIGHT">
<position height="81" width="173" x="469" y="194"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<class id="5" language="java" name="com.iluwatar.abstractdocument.domain.Car" project="design-patterns"
file="/design-patterns/src/com/iluwatar/abstractdocument/domain/Car.java" binary="false" corner="BOTTOM_RIGHT">
<position height="99" width="173" x="254" y="37"/>
<class-diagram version="1.2.2" icons="true" always-add-relationships="false" generalizations="true" realizations="true"
associations="true" dependencies="false" nesting-relationships="true" router="FAN">
<class id="1" language="java" name="com.iluwatar.abstractdocument.AbstractDocument" project="abstract-document"
file="/abstract-document/src/main/java/com/iluwatar/abstractdocument/AbstractDocument.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="659" y="286"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="6" language="java" name="com.iluwatar.abstractdocument.domain.Part" project="design-patterns"
file="/design-patterns/src/com/iluwatar/abstractdocument/domain/Part.java" binary="false" corner="BOTTOM_RIGHT">
<position height="99" width="173" x="41" y="37"/>
<interface id="2" language="java" name="com.iluwatar.abstractdocument.Document" project="abstract-document"
file="/abstract-document/src/main/java/com/iluwatar/abstractdocument/Document.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="562" y="27"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<class id="3" language="java" name="com.iluwatar.abstractdocument.domain.Car" project="abstract-document"
file="/abstract-document/src/main/java/com/iluwatar/abstractdocument/domain/Car.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="348" y="737"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<realization id="7">
<end type="SOURCE" refId="5"/>
<end type="TARGET" refId="2"/>
<class id="4" language="java" name="com.iluwatar.abstractdocument.domain.Part" project="abstract-document"
file="/abstract-document/src/main/java/com/iluwatar/abstractdocument/domain/Part.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="760" y="746"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<interface id="5" language="java" name="com.iluwatar.abstractdocument.domain.HasModel" project="abstract-document"
file="/abstract-document/src/main/java/com/iluwatar/abstractdocument/domain/HasModel.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="355" y="297"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<interface id="6" language="java" name="com.iluwatar.abstractdocument.domain.HasParts" project="abstract-document"
file="/abstract-document/src/main/java/com/iluwatar/abstractdocument/domain/HasParts.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="109" y="297"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<interface id="7" language="java" name="com.iluwatar.abstractdocument.domain.HasPrice" project="abstract-document"
file="/abstract-document/src/main/java/com/iluwatar/abstractdocument/domain/HasPrice.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="1008" y="283"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<interface id="8" language="java" name="com.iluwatar.abstractdocument.domain.HasType" project="abstract-document"
file="/abstract-document/src/main/java/com/iluwatar/abstractdocument/domain/HasType.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="1257" y="277"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<realization id="9">
<end type="SOURCE" refId="4"/>
<end type="TARGET" refId="8"/>
</realization>
<realization id="8">
<realization id="10">
<end type="SOURCE" refId="3"/>
<end type="TARGET" refId="7"/>
</realization>
<generalization id="11">
<end type="SOURCE" refId="6"/>
<end type="TARGET" refId="2"/>
</realization>
<generalization id="9">
<end type="SOURCE" refId="2"/>
<end type="TARGET" refId="1"/>
</generalization>
<realization id="10">
<end type="SOURCE" refId="5"/>
<end type="TARGET" refId="3"/>
<realization id="12">
<end type="SOURCE" refId="4"/>
<end type="TARGET" refId="5"/>
</realization>
<realization id="11">
<end type="SOURCE" refId="5"/>
<end type="TARGET" refId="4"/>
<realization id="13">
<end type="SOURCE" refId="4"/>
<end type="TARGET" refId="7"/>
</realization>
<generalization id="12">
<generalization id="14">
<end type="SOURCE" refId="3"/>
<end type="TARGET" refId="1"/>
</generalization>
<generalization id="13">
<realization id="15">
<end type="SOURCE" refId="3"/>
<end type="TARGET" refId="6"/>
</realization>
<generalization id="16">
<end type="SOURCE" refId="8"/>
<end type="TARGET" refId="2"/>
</generalization>
<generalization id="17">
<end type="SOURCE" refId="7"/>
<end type="TARGET" refId="2"/>
</generalization>
<realization id="18">
<end type="SOURCE" refId="3"/>
<end type="TARGET" refId="5"/>
</realization>
<generalization id="19">
<end type="SOURCE" refId="4"/>
<end type="TARGET" refId="1"/>
</generalization>
<realization id="14">
<end type="SOURCE" refId="6"/>
<end type="TARGET" refId="3"/>
<generalization id="20">
<end type="SOURCE" refId="5"/>
<end type="TARGET" refId="2"/>
</generalization>
<realization id="21">
<end type="SOURCE" refId="1"/>
<end type="TARGET" refId="2"/>
</realization>
<classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">

View File

@ -1,22 +1,28 @@
@startuml
package com.iluwatar.abstractdocument.domain.enums {
enum Property {
+ MODEL {static}
+ PARTS {static}
+ PRICE {static}
+ TYPE {static}
+ valueOf(name : String) : Property {static}
+ values() : Property[] {static}
}
}
package com.iluwatar.abstractdocument.domain {
class Car {
+ Car(properties : Map<String, Object>)
}
interface HasModel {
+ PROPERTY : String {static}
+ getModel() : Optional<String>
}
interface HasParts {
+ PROPERTY : String {static}
+ getParts() : Stream<Part>
}
interface HasPrice {
+ PROPERTY : String {static}
+ getPrice() : Optional<Number>
}
interface HasType {
+ PROPERTY : String {static}
+ getType() : Optional<String>
}
class Part {

View File

@ -2,7 +2,7 @@
<!--
The MIT License
Copyright (c) 2014-2016 Ilkka Seppälä
Copyright © 2014-2021 Ilkka Seppälä
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -23,20 +23,40 @@
THE SOFTWARE.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>java-design-patterns</artifactId>
<groupId>com.iluwatar</groupId>
<version>1.16.0</version>
</parent>
<artifactId>abstract-document</artifactId>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>java-design-patterns</artifactId>
<groupId>com.iluwatar</groupId>
<version>1.26.0-SNAPSHOT</version>
</parent>
<artifactId>abstract-document</artifactId>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Maven assembly plugin is invoked with default setting which we have
in parent pom and specifying the class having main method -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<configuration>
<archive>
<manifest>
<mainClass>com.iluwatar.abstractdocument.App</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,17 +1,17 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* <p>
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p>
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -20,17 +20,18 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractdocument;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Stream;
/**
* Abstract implementation of Document interface
* Abstract implementation of Document interface.
*/
public abstract class AbstractDocument implements Document {
@ -54,17 +55,21 @@ public abstract class AbstractDocument implements Document {
@Override
public <T> Stream<T> children(String key, Function<Map<String, Object>, T> constructor) {
Optional<List<Map<String, Object>>> any = Stream.of(get(key)).filter(el -> el != null)
.map(el -> (List<Map<String, Object>>) el).findAny();
return any.isPresent() ? any.get().stream().map(constructor) : Stream.empty();
return Stream.ofNullable(get(key))
.filter(Objects::nonNull)
.map(el -> (List<Map<String, Object>>) el)
.findAny()
.stream()
.flatMap(Collection::stream)
.map(constructor);
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
var builder = new StringBuilder();
builder.append(getClass().getName()).append("[");
properties.entrySet()
.forEach(e -> builder.append("[").append(e.getKey()).append(" : ").append(e.getValue()).append("]"));
properties.forEach((key, value) -> builder.append("[").append(key).append(" : ").append(value)
.append("]"));
builder.append("]");
return builder.toString();
}

View File

@ -1,17 +1,17 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* <p>
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p>
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -20,72 +20,59 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractdocument;
import com.iluwatar.abstractdocument.domain.Car;
import com.iluwatar.abstractdocument.domain.HasModel;
import com.iluwatar.abstractdocument.domain.HasParts;
import com.iluwatar.abstractdocument.domain.HasPrice;
import com.iluwatar.abstractdocument.domain.HasType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.HashMap;
import com.iluwatar.abstractdocument.domain.enums.Property;
import java.util.List;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
/**
* The Abstract Document pattern enables handling additional, non-static
* properties. This pattern uses concept of traits to enable type safety and
* separate properties of different classes into set of interfaces.
* <p>
* <p>
* In Abstract Document pattern,({@link AbstractDocument}) fully implements
* {@link Document}) interface. Traits are then defined to enable access to
* properties in usual, static way.
* The Abstract Document pattern enables handling additional, non-static properties. This pattern
* uses concept of traits to enable type safety and separate properties of different classes into
* set of interfaces.
*
* <p>In Abstract Document pattern,({@link AbstractDocument}) fully implements {@link Document})
* interface. Traits are then defined to enable access to properties in usual, static way.
*/
@Slf4j
public class App {
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
/**
* Executes the App
*/
public App() {
LOGGER.info("Constructing parts and car");
Map<String, Object> carProperties = new HashMap<>();
carProperties.put(HasModel.PROPERTY, "300SL");
carProperties.put(HasPrice.PROPERTY, 10000L);
Map<String, Object> wheelProperties = new HashMap<>();
wheelProperties.put(HasType.PROPERTY, "wheel");
wheelProperties.put(HasModel.PROPERTY, "15C");
wheelProperties.put(HasPrice.PROPERTY, 100L);
Map<String, Object> doorProperties = new HashMap<>();
doorProperties.put(HasType.PROPERTY, "door");
doorProperties.put(HasModel.PROPERTY, "Lambo");
doorProperties.put(HasPrice.PROPERTY, 300L);
carProperties.put(HasParts.PROPERTY, Arrays.asList(wheelProperties, doorProperties));
Car car = new Car(carProperties);
LOGGER.info("Here is our car:");
LOGGER.info("-> model: {}", car.getModel().get());
LOGGER.info("-> price: {}", car.getPrice().get());
LOGGER.info("-> parts: ");
car.getParts().forEach(p -> LOGGER.info("\t{}/{}/{}", p.getType().get(), p.getModel().get(), p.getPrice().get()));
}
/**
* Program entry point
* Program entry point.
*
* @param args command line args
*/
public static void main(String[] args) {
new App();
}
LOGGER.info("Constructing parts and car");
var wheelProperties = Map.of(
Property.TYPE.toString(), "wheel",
Property.MODEL.toString(), "15C",
Property.PRICE.toString(), 100L);
var doorProperties = Map.of(
Property.TYPE.toString(), "door",
Property.MODEL.toString(), "Lambo",
Property.PRICE.toString(), 300L);
var carProperties = Map.of(
Property.MODEL.toString(), "300SL",
Property.PRICE.toString(), 10000L,
Property.PARTS.toString(), List.of(wheelProperties, doorProperties));
var car = new Car(carProperties);
LOGGER.info("Here is our car:");
LOGGER.info("-> model: {}", car.getModel().orElseThrow());
LOGGER.info("-> price: {}", car.getPrice().orElseThrow());
LOGGER.info("-> parts: ");
car.getParts().forEach(p -> LOGGER.info("\t{}/{}/{}",
p.getType().orElse(null),
p.getModel().orElse(null),
p.getPrice().orElse(null))
);
}
}

View File

@ -1,17 +1,17 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* <p>
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p>
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -20,6 +20,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractdocument;
import java.util.Map;
@ -27,12 +28,12 @@ import java.util.function.Function;
import java.util.stream.Stream;
/**
* Document interface
* Document interface.
*/
public interface Document {
/**
* Puts the value related to the key
* Puts the value related to the key.
*
* @param key element key
* @param value element value
@ -41,7 +42,7 @@ public interface Document {
Void put(String key, Object value);
/**
* Gets the value for the key
* Gets the value for the key.
*
* @param key element key
* @return value or null
@ -49,7 +50,7 @@ public interface Document {
Object get(String key);
/**
* Gets the stream of child documents
* Gets the stream of child documents.
*
* @param key element key
* @param constructor constructor of child class

View File

@ -1,17 +1,17 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* <p>
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p>
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -20,14 +20,14 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractdocument.domain;
import com.iluwatar.abstractdocument.AbstractDocument;
import java.util.Map;
import com.iluwatar.abstractdocument.AbstractDocument;
/**
* Car entity
* Car entity.
*/
public class Car extends AbstractDocument implements HasModel, HasPrice, HasParts {

View File

@ -1,17 +1,17 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* <p>
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p>
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -20,21 +20,20 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractdocument.domain;
import com.iluwatar.abstractdocument.Document;
import com.iluwatar.abstractdocument.domain.enums.Property;
import java.util.Optional;
import com.iluwatar.abstractdocument.Document;
/**
* HasModel trait for static access to 'model' property
* HasModel trait for static access to 'model' property.
*/
public interface HasModel extends Document {
String PROPERTY = "model";
default Optional<String> getModel() {
return Optional.ofNullable((String) get(PROPERTY));
return Optional.ofNullable((String) get(Property.MODEL.toString()));
}
}

View File

@ -1,17 +1,17 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* <p>
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p>
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -20,21 +20,20 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractdocument.domain;
import com.iluwatar.abstractdocument.Document;
import com.iluwatar.abstractdocument.domain.enums.Property;
import java.util.stream.Stream;
import com.iluwatar.abstractdocument.Document;
/**
* HasParts trait for static access to 'parts' property
* HasParts trait for static access to 'parts' property.
*/
public interface HasParts extends Document {
String PROPERTY = "parts";
default Stream<Part> getParts() {
return children(PROPERTY, Part::new);
return children(Property.PARTS.toString(), Part::new);
}
}

View File

@ -1,17 +1,17 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* <p>
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p>
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -20,21 +20,20 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractdocument.domain;
import com.iluwatar.abstractdocument.Document;
import com.iluwatar.abstractdocument.domain.enums.Property;
import java.util.Optional;
import com.iluwatar.abstractdocument.Document;
/**
* HasPrice trait for static access to 'price' property
* HasPrice trait for static access to 'price' property.
*/
public interface HasPrice extends Document {
String PROPERTY = "price";
default Optional<Number> getPrice() {
return Optional.ofNullable((Number) get(PROPERTY));
return Optional.ofNullable((Number) get(Property.PRICE.toString()));
}
}

View File

@ -1,17 +1,17 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* <p>
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p>
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -20,21 +20,20 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractdocument.domain;
import com.iluwatar.abstractdocument.Document;
import com.iluwatar.abstractdocument.domain.enums.Property;
import java.util.Optional;
/**
* HasType trait for static access to 'type' property
* HasType trait for static access to 'type' property.
*/
public interface HasType extends Document {
String PROPERTY = "type";
default Optional<String> getType() {
return Optional.ofNullable((String) get(PROPERTY));
return Optional.ofNullable((String) get(Property.TYPE.toString()));
}
}

View File

@ -1,17 +1,17 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* <p>
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p>
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -20,14 +20,14 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractdocument.domain;
import com.iluwatar.abstractdocument.AbstractDocument;
import java.util.Map;
import com.iluwatar.abstractdocument.AbstractDocument;
/**
* Part entity
* Part entity.
*/
public class Part extends AbstractDocument implements HasType, HasModel, HasPrice {

View File

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

View File

@ -1,17 +1,17 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* <p>
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p>
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -20,69 +20,64 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractdocument;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static org.junit.jupiter.api.Assertions.*;
/**
* AbstractDocument test class
*/
public class AbstractDocumentTest {
class AbstractDocumentTest {
private static final String KEY = "key";
private static final String VALUE = "value";
private class DocumentImplementation extends AbstractDocument {
private static class DocumentImplementation extends AbstractDocument {
DocumentImplementation(Map<String, Object> properties) {
super(properties);
}
}
private DocumentImplementation document = new DocumentImplementation(new HashMap<>());
private final DocumentImplementation document = new DocumentImplementation(new HashMap<>());
@Test
public void shouldPutAndGetValue() {
void shouldPutAndGetValue() {
document.put(KEY, VALUE);
assertEquals(VALUE, document.get(KEY));
}
@Test
public void shouldRetrieveChildren() {
Map<String, Object> child1 = new HashMap<>();
Map<String, Object> child2 = new HashMap<>();
List<Map<String, Object>> children = Arrays.asList(child1, child2);
void shouldRetrieveChildren() {
var children = List.of(Map.of(), Map.of());
document.put(KEY, children);
Stream<DocumentImplementation> childrenStream = document.children(KEY, DocumentImplementation::new);
var childrenStream = document.children(KEY, DocumentImplementation::new);
assertNotNull(children);
assertEquals(2, childrenStream.count());
}
@Test
public void shouldRetrieveEmptyStreamForNonExistingChildren() {
Stream<DocumentImplementation> children = document.children(KEY, DocumentImplementation::new);
void shouldRetrieveEmptyStreamForNonExistingChildren() {
var children = document.children(KEY, DocumentImplementation::new);
assertNotNull(children);
assertEquals(0, children.count());
}
@Test
public void shouldIncludePropsInToString() {
Map<String, Object> props = new HashMap<>();
props.put(KEY, VALUE);
DocumentImplementation document = new DocumentImplementation(props);
assertNotNull(document.toString().contains(KEY));
assertNotNull(document.toString().contains(VALUE));
void shouldIncludePropsInToString() {
var props = Map.of(KEY, (Object) VALUE);
var document = new DocumentImplementation(props);
assertTrue(document.toString().contains(KEY));
assertTrue(document.toString().contains(VALUE));
}
}

View File

@ -1,17 +1,17 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* <p>
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p>
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -20,18 +20,28 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractdocument;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
/**
* Simple App test
*/
public class AppTest {
class AppTest {
/**
* Issue: Add at least one assertion to this test case.
*
* Solution: Inserted assertion to check whether the execution of the main method in {@link App}
* throws an exception.
*/
@Test
public void shouldExecuteAppWithoutException() {
App.main(null);
void shouldExecuteAppWithoutException() {
assertDoesNotThrow(() -> App.main(null));
}
}

View File

@ -1,17 +1,17 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* <p>
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p>
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -20,26 +20,23 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractdocument;
import com.iluwatar.abstractdocument.domain.Car;
import com.iluwatar.abstractdocument.domain.HasModel;
import com.iluwatar.abstractdocument.domain.HasParts;
import com.iluwatar.abstractdocument.domain.HasPrice;
import com.iluwatar.abstractdocument.domain.HasType;
import com.iluwatar.abstractdocument.domain.Part;
import org.junit.Test;
import com.iluwatar.abstractdocument.domain.enums.Property;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static junit.framework.TestCase.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* Test for Part and Car
*/
public class DomainTest {
class DomainTest {
private static final String TEST_PART_TYPE = "test-part-type";
private static final String TEST_PART_MODEL = "test-part-model";
@ -49,28 +46,28 @@ public class DomainTest {
private static final long TEST_CAR_PRICE = 1L;
@Test
public void shouldConstructPart() {
Map<String, Object> partProperties = new HashMap<>();
partProperties.put(HasType.PROPERTY, TEST_PART_TYPE);
partProperties.put(HasModel.PROPERTY, TEST_PART_MODEL);
partProperties.put(HasPrice.PROPERTY, TEST_PART_PRICE);
Part part = new Part(partProperties);
assertEquals(TEST_PART_TYPE, part.getType().get());
assertEquals(TEST_PART_MODEL, part.getModel().get());
assertEquals(TEST_PART_PRICE, part.getPrice().get());
void shouldConstructPart() {
var partProperties = Map.of(
Property.TYPE.toString(), TEST_PART_TYPE,
Property.MODEL.toString(), TEST_PART_MODEL,
Property.PRICE.toString(), (Object) TEST_PART_PRICE
);
var part = new Part(partProperties);
assertEquals(TEST_PART_TYPE, part.getType().orElseThrow());
assertEquals(TEST_PART_MODEL, part.getModel().orElseThrow());
assertEquals(TEST_PART_PRICE, part.getPrice().orElseThrow());
}
@Test
public void shouldConstructCar() {
Map<String, Object> carProperties = new HashMap<>();
carProperties.put(HasModel.PROPERTY, TEST_CAR_MODEL);
carProperties.put(HasPrice.PROPERTY, TEST_CAR_PRICE);
carProperties.put(HasParts.PROPERTY, Arrays.asList(new HashMap<>(), new HashMap<>()));
Car car = new Car(carProperties);
assertEquals(TEST_CAR_MODEL, car.getModel().get());
assertEquals(TEST_CAR_PRICE, car.getPrice().get());
void shouldConstructCar() {
var carProperties = Map.of(
Property.MODEL.toString(), TEST_CAR_MODEL,
Property.PRICE.toString(), TEST_CAR_PRICE,
Property.PARTS.toString(), List.of(Map.of(), Map.of())
);
var car = new Car(carProperties);
assertEquals(TEST_CAR_MODEL, car.getModel().orElseThrow());
assertEquals(TEST_CAR_PRICE, car.getPrice().orElseThrow());
assertEquals(2, car.getParts().count());
}

View File

@ -3,53 +3,233 @@ layout: pattern
title: Abstract Factory
folder: abstract-factory
permalink: /patterns/abstract-factory/
pumlid: PSZB3OD034NHLa81Czwd6sCC39gVxEUWT1_ssLmTtQLqgR5fM7sTmFGtaV6TZu8prd0r6HtQaMKqAZLk1XjT_E6qgPUZfyc0MdTgx0-8LuUn8ErFXdr98NypXxKyezKV
categories: Creational
language: en
tags:
- Java
- Gang Of Four
- Difficulty-Intermediate
- Gang of Four
---
## Also known as
Kit
## Intent
Provide an interface for creating families of related or dependent
objects without specifying their concrete classes.
![alt text](./etc/abstract-factory_1.png "Abstract Factory")
## Explanation
Real-world example
> To create a kingdom we need objects with a common theme. The elven kingdom needs an elven king, elven castle, and elven army whereas the orcish kingdom needs an orcish king, orcish castle, and orcish army. There is a dependency between the objects in the kingdom.
In plain words
> A factory of factories; a factory that groups the individual but related/dependent factories together without specifying their concrete classes.
Wikipedia says
> The abstract factory pattern provides a way to encapsulate a group of individual factories that have a common theme without specifying their concrete classes
**Programmatic Example**
Translating the kingdom example above. First of all, we have some interfaces and implementation for the objects in the
kingdom.
```java
public interface Castle {
String getDescription();
}
public interface King {
String getDescription();
}
public interface Army {
String getDescription();
}
// Elven implementations ->
public class ElfCastle implements Castle {
static final String DESCRIPTION = "This is the elven castle!";
@Override
public String getDescription() {
return DESCRIPTION;
}
}
public class ElfKing implements King {
static final String DESCRIPTION = "This is the elven king!";
@Override
public String getDescription() {
return DESCRIPTION;
}
}
public class ElfArmy implements Army {
static final String DESCRIPTION = "This is the elven Army!";
@Override
public String getDescription() {
return DESCRIPTION;
}
}
// Orcish implementations similarly -> ...
```
Then we have the abstraction and implementations for the kingdom factory.
```java
public interface KingdomFactory {
Castle createCastle();
King createKing();
Army createArmy();
}
public class ElfKingdomFactory implements KingdomFactory {
@Override
public Castle createCastle() {
return new ElfCastle();
}
@Override
public King createKing() {
return new ElfKing();
}
@Override
public Army createArmy() {
return new ElfArmy();
}
}
public class OrcKingdomFactory implements KingdomFactory {
@Override
public Castle createCastle() {
return new OrcCastle();
}
@Override
public King createKing() {
return new OrcKing();
}
@Override
public Army createArmy() {
return new OrcArmy();
}
}
```
Now we have the abstract factory that lets us make a family of related objects i.e. elven kingdom factory creates elven castle, king and army, etc.
```java
var factory = new ElfKingdomFactory();
var castle = factory.createCastle();
var king = factory.createKing();
var army = factory.createArmy();
castle.getDescription();
king.getDescription();
army.getDescription();
```
Program output:
```java
This is the elven castle!
This is the elven king!
This is the elven Army!
```
Now, we can design a factory for our different kingdom factories. In this example, we created `FactoryMaker`, responsible for returning an instance of either `ElfKingdomFactory` or `OrcKingdomFactory`.
The client can use `FactoryMaker` to create the desired concrete factory which, in turn, will produce different concrete objects (derived from `Army`, `King`, `Castle`).
In this example, we also used an enum to parameterize which type of kingdom factory the client will ask for.
```java
public static class FactoryMaker {
public enum KingdomType {
ELF, ORC
}
public static KingdomFactory makeFactory(KingdomType type) {
switch (type) {
case ELF:
return new ElfKingdomFactory();
case ORC:
return new OrcKingdomFactory();
default:
throw new IllegalArgumentException("KingdomType not supported.");
}
}
}
public static void main(String[] args) {
var app = new App();
LOGGER.info("Elf Kingdom");
app.createKingdom(FactoryMaker.makeFactory(KingdomType.ELF));
LOGGER.info(app.getArmy().getDescription());
LOGGER.info(app.getCastle().getDescription());
LOGGER.info(app.getKing().getDescription());
LOGGER.info("Orc Kingdom");
app.createKingdom(FactoryMaker.makeFactory(KingdomType.ORC));
-- similar use of the orc factory
}
```
## Class diagram
![alt text](./etc/abstract-factory.urm.png "Abstract Factory class diagram")
## Applicability
Use the Abstract Factory pattern when
* a system should be independent of how its products are created, composed and represented
* a system should be configured with one of multiple families of products
* a family of related product objects is designed to be used together, and you need to enforce this constraint
* you want to provide a class library of products, and you want to reveal just their interfaces, not their implementations
* the lifetime of the dependency is conceptually shorter than the lifetime of the consumer.
* you need a run-time value to construct a particular dependency
* you want to decide which product to call from a family at runtime.
* you need to supply one or more parameters only known at run-time before you can resolve a dependency.
* The system should be independent of how its products are created, composed, and represented
* The system should be configured with one of the multiple families of products
* The family of related product objects is designed to be used together, and you need to enforce this constraint
* You want to provide a class library of products, and you want to reveal just their interfaces, not their implementations
* The lifetime of the dependency is conceptually shorter than the lifetime of the consumer.
* You need a run-time value to construct a particular dependency
* You want to decide which product to call from a family at runtime.
* You need to supply one or more parameters only known at run-time before you can resolve a dependency.
* When you need consistency among products
* You dont want to change existing code when adding new products or families of products to the program.
## Use Cases:
Example use cases
* Selecting to call the appropriate implementation of FileSystemAcmeService or DatabaseAcmeService or NetworkAcmeService at runtime.
* Unit test case writing becomes much easier
* Selecting to call to the appropriate implementation of FileSystemAcmeService or DatabaseAcmeService or NetworkAcmeService at runtime.
* Unit test case writing becomes much easier
* UI tools for different OS
## Consequences:
## Consequences
* Dependency injection in java hides the service class dependencies that can lead to runtime errors that would have been caught at compile time.
* Dependency injection in java hides the service class dependencies that can lead to runtime errors that would have been caught at compile time.
* While the pattern is great when creating predefined objects, adding the new ones might be challenging.
* The code becomes more complicated than it should be since a lot of new interfaces and classes are introduced along with the pattern.
## Tutorials
* [Abstract Factory Pattern Tutorial](https://www.journaldev.com/1418/abstract-factory-design-pattern-in-java)
## Real world examples
## Known uses
* [javax.xml.parsers.DocumentBuilderFactory](http://docs.oracle.com/javase/8/docs/api/javax/xml/parsers/DocumentBuilderFactory.html)
* [javax.xml.transform.TransformerFactory](http://docs.oracle.com/javase/8/docs/api/javax/xml/transform/TransformerFactory.html#newInstance--)
* [javax.xml.xpath.XPathFactory](http://docs.oracle.com/javase/8/docs/api/javax/xml/xpath/XPathFactory.html#newInstance--)
## Related patterns
* [Factory Method](https://java-design-patterns.com/patterns/factory-method/)
* [Factory Kit](https://java-design-patterns.com/patterns/factory-kit/)
## Credits
* [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](https://www.amazon.com/gp/product/0201633612/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0201633612&linkCode=as2&tag=javadesignpat-20&linkId=675d49790ce11db99d90bde47f1aeb59)
* [Head First Design Patterns: A Brain-Friendly Guide](https://www.amazon.com/gp/product/0596007124/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0596007124&linkCode=as2&tag=javadesignpat-20&linkId=6b8b6eea86021af6c8e3cd3fc382cb5b)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

View File

@ -1,159 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<class-diagram version="1.1.8" icons="true" automaticImage="PNG" always-add-relationships="false" generalizations="true"
realizations="true" associations="true" dependencies="false" nesting-relationships="true">
<interface id="1" language="java" name="com.iluwatar.abstractfactory.Army" project="abstract-factory"
file="/abstract-factory/src/main/java/com/iluwatar/abstractfactory/Army.java" binary="false" corner="BOTTOM_RIGHT">
<position height="70" width="161" x="1407" y="300"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<interface id="2" language="java" name="com.iluwatar.abstractfactory.KingdomFactory" project="abstract-factory"
file="/abstract-factory/src/main/java/com/iluwatar/abstractfactory/KingdomFactory.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="124" width="161" x="1001" y="300"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<class id="3" language="java" name="com.iluwatar.abstractfactory.ElfCastle" project="abstract-factory"
file="/abstract-factory/src/main/java/com/iluwatar/abstractfactory/ElfCastle.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="106" width="161" x="96" y="118"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="4" language="java" name="com.iluwatar.abstractfactory.ElfKingdomFactory" project="abstract-factory"
file="/abstract-factory/src/main/java/com/iluwatar/abstractfactory/ElfKingdomFactory.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="142" width="161" x="900" y="118"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="5" language="java" name="com.iluwatar.abstractfactory.ElfKing" project="abstract-factory"
file="/abstract-factory/src/main/java/com/iluwatar/abstractfactory/ElfKing.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="106" width="161" x="498" y="118"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<interface id="6" language="java" name="com.iluwatar.abstractfactory.King" project="abstract-factory"
file="/abstract-factory/src/main/java/com/iluwatar/abstractfactory/King.java" binary="false" corner="BOTTOM_RIGHT">
<position height="70" width="161" x="599" y="300"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<class id="7" language="java" name="com.iluwatar.abstractfactory.OrcCastle" project="abstract-factory"
file="/abstract-factory/src/main/java/com/iluwatar/abstractfactory/OrcCastle.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="106" width="161" x="297" y="118"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="8" language="java" name="com.iluwatar.abstractfactory.OrcKing" project="abstract-factory"
file="/abstract-factory/src/main/java/com/iluwatar/abstractfactory/OrcKing.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="106" width="161" x="699" y="118"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="9" language="java" name="com.iluwatar.abstractfactory.ElfArmy" project="abstract-factory"
file="/abstract-factory/src/main/java/com/iluwatar/abstractfactory/ElfArmy.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="106" width="161" x="1306" y="118"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="10" language="java" name="com.iluwatar.abstractfactory.OrcArmy" project="abstract-factory"
file="/abstract-factory/src/main/java/com/iluwatar/abstractfactory/OrcArmy.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="106" width="161" x="1507" y="118"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<interface id="11" language="java" name="com.iluwatar.abstractfactory.Castle" project="abstract-factory"
file="/abstract-factory/src/main/java/com/iluwatar/abstractfactory/Castle.java" binary="false" corner="BOTTOM_RIGHT">
<position height="70" width="161" x="197" y="300"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<class id="12" language="java" name="com.iluwatar.abstractfactory.OrcKingdomFactory" project="abstract-factory"
file="/abstract-factory/src/main/java/com/iluwatar/abstractfactory/OrcKingdomFactory.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="142" width="165" x="1101" y="118"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<realization id="13">
<end type="SOURCE" refId="4"/>
<end type="TARGET" refId="2"/>
</realization>
<realization id="14">
<end type="SOURCE" refId="7"/>
<end type="TARGET" refId="11"/>
</realization>
<realization id="15">
<end type="SOURCE" refId="8"/>
<end type="TARGET" refId="6"/>
</realization>
<realization id="16">
<end type="SOURCE" refId="3"/>
<end type="TARGET" refId="11"/>
</realization>
<realization id="17">
<end type="SOURCE" refId="10"/>
<end type="TARGET" refId="1"/>
</realization>
<realization id="18">
<end type="SOURCE" refId="12"/>
<end type="TARGET" refId="2"/>
</realization>
<realization id="19">
<end type="SOURCE" refId="5"/>
<end type="TARGET" refId="6"/>
</realization>
<realization id="20">
<end type="SOURCE" refId="9"/>
<end type="TARGET" refId="1"/>
</realization>
<classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</classifier-display>
<association-display labels="true" multiplicity="true"/>
</class-diagram>

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@ -18,6 +18,16 @@ package com.iluwatar.abstractfactory {
- setCastle(castle : Castle)
- setKing(king : King)
}
class FactoryMaker {
+ FactoryMaker()
+ makeFactory(type : KingdomType) : KingdomFactory {static}
}
enum KingdomType {
+ ELF {static}
+ ORC {static}
+ valueOf(name : String) : KingdomType {static}
+ values() : KingdomType[] {static}
}
interface Army {
+ getDescription() : String {abstract}
}
@ -75,7 +85,9 @@ package com.iluwatar.abstractfactory {
+ createKing() : King
}
}
KingdomType ..+ FactoryMaker
App --> "-castle" Castle
FactoryMaker ..+ App
App --> "-king" King
App --> "-army" Army
ElfArmy ..|> Army

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License
Copyright (c) 2014-2016 Ilkka Seppälä
Copyright © 2014-2021 Ilkka Seppälä
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -23,20 +23,40 @@
THE SOFTWARE.
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.iluwatar</groupId>
<artifactId>java-design-patterns</artifactId>
<version>1.16.0</version>
<version>1.26.0-SNAPSHOT</version>
</parent>
<artifactId>abstract-factory</artifactId>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Maven assembly plugin is invoked with default setting which we have
in parent pom and specifying the class having main method -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<configuration>
<archive>
<manifest>
<mainClass>com.iluwatar.abstractfactory.App</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,101 +20,67 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
/**
*
* The Abstract Factory pattern provides a way to encapsulate a group of individual factories that have a common theme
* without specifying their concrete classes. In normal usage, the client software creates a concrete implementation of
* the abstract factory and then uses the generic interface of the factory to create the concrete objects that are part
* of the theme. The client does not know (or care) which concrete objects it gets from each of these internal
* factories, since it uses only the generic interfaces of their products. This pattern separates the details of
* implementation of a set of objects from their general usage and relies on object composition, as object creation is
* implemented in methods exposed in the factory interface.
* <p>
* The essence of the Abstract Factory pattern is a factory interface ({@link KingdomFactory}) and its implementations (
* {@link ElfKingdomFactory}, {@link OrcKingdomFactory}). The example uses both concrete implementations to create a
* king, a castle and an army.
*
* The Abstract Factory pattern provides a way to encapsulate a group of individual factories that
* have a common theme without specifying their concrete classes. In normal usage, the client
* software creates a concrete implementation of the abstract factory and then uses the generic
* interface of the factory to create the concrete objects that are part of the theme. The client
* does not know (or care) which concrete objects it gets from each of these internal factories,
* since it uses only the generic interfaces of their products. This pattern separates the details
* of implementation of a set of objects from their general usage and relies on object composition,
* as object creation is implemented in methods exposed in the factory interface.
*
* <p>The essence of the Abstract Factory pattern is a factory interface ({@link KingdomFactory})
* and its implementations ( {@link ElfKingdomFactory}, {@link OrcKingdomFactory}). The example uses
* both concrete implementations to create a king, a castle, and an army.
*/
public class App {
@Slf4j
public class App implements Runnable {
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
private final Kingdom kingdom = new Kingdom();
private King king;
private Castle castle;
private Army army;
public Kingdom getKingdom() {
return kingdom;
}
/**
* Creates kingdom
*/
public void createKingdom(final KingdomFactory factory) {
setKing(factory.createKing());
setCastle(factory.createCastle());
setArmy(factory.createArmy());
}
King getKing(final KingdomFactory factory) {
return factory.createKing();
}
public King getKing() {
return king;
}
private void setKing(final King king) {
this.king = king;
}
Castle getCastle(final KingdomFactory factory) {
return factory.createCastle();
}
public Castle getCastle() {
return castle;
}
private void setCastle(final Castle castle) {
this.castle = castle;
}
Army getArmy(final KingdomFactory factory) {
return factory.createArmy();
}
public Army getArmy() {
return army;
}
private void setArmy(final Army army) {
this.army = army;
}
/**
* Program entry point
*
* @param args
* command line args
* Program entry point.
*
* @param args command line args
*/
public static void main(String[] args) {
App app = new App();
LOGGER.info("Elf Kingdom");
app.createKingdom(new ElfKingdomFactory());
LOGGER.info(app.getArmy().getDescription());
LOGGER.info(app.getCastle().getDescription());
LOGGER.info(app.getKing().getDescription());
LOGGER.info("Orc Kingdom");
app.createKingdom(new OrcKingdomFactory());
LOGGER.info(app.getArmy().getDescription());
LOGGER.info(app.getCastle().getDescription());
LOGGER.info(app.getKing().getDescription());
var app = new App();
app.run();
}
}
@Override
public void run() {
LOGGER.info("elf kingdom");
createKingdom(Kingdom.FactoryMaker.KingdomType.ELF);
LOGGER.info(kingdom.getArmy().getDescription());
LOGGER.info(kingdom.getCastle().getDescription());
LOGGER.info(kingdom.getKing().getDescription());
LOGGER.info("orc kingdom");
createKingdom(Kingdom.FactoryMaker.KingdomType.ORC);
LOGGER.info(kingdom.getArmy().getDescription());
LOGGER.info(kingdom.getCastle().getDescription());
LOGGER.info(kingdom.getKing().getDescription());
}
/**
* Creates kingdom.
* @param kingdomType type of Kingdom
*/
public void createKingdom(final Kingdom.FactoryMaker.KingdomType kingdomType) {
final KingdomFactory kingdomFactory = Kingdom.FactoryMaker.makeFactory(kingdomType);
kingdom.setKing(kingdomFactory.createKing());
kingdom.setCastle(kingdomFactory.createCastle());
kingdom.setArmy(kingdomFactory.createArmy());
}
}

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,12 +20,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
/**
*
* Army interface
*
* Army interface.
*/
public interface Army {

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,12 +20,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
/**
*
* Castle interface
*
* Castle interface.
*/
public interface Castle {

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,16 +20,15 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
/**
*
* ElfArmy
*
* ElfArmy.
*/
public class ElfArmy implements Army {
static final String DESCRIPTION = "This is the Elven Army!";
static final String DESCRIPTION = "This is the elven army!";
@Override
public String getDescription() {

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,16 +20,15 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
/**
*
* ElfCastle
*
* ElfCastle.
*/
public class ElfCastle implements Castle {
static final String DESCRIPTION = "This is the Elven castle!";
static final String DESCRIPTION = "This is the elven castle!";
@Override
public String getDescription() {

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,16 +20,15 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
/**
*
* ElfKing
*
* ElfKing.
*/
public class ElfKing implements King {
static final String DESCRIPTION = "This is the Elven king!";
static final String DESCRIPTION = "This is the elven king!";
@Override
public String getDescription() {

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,23 +20,25 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
/**
*
* ElfKingdomFactory concrete factory.
*
*/
public class ElfKingdomFactory implements KingdomFactory {
@Override
public Castle createCastle() {
return new ElfCastle();
}
@Override
public King createKing() {
return new ElfKing();
}
@Override
public Army createArmy() {
return new ElfArmy();
}

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,12 +20,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
/**
*
* King interface
*
* King interface.
*/
public interface King {

View File

@ -0,0 +1,63 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class Kingdom {
private King king;
private Castle castle;
private Army army;
/**
* The factory of kingdom factories.
*/
public static class FactoryMaker {
/**
* Enumeration for the different types of Kingdoms.
*/
public enum KingdomType {
ELF, ORC
}
/**
* The factory method to create KingdomFactory concrete objects.
*/
public static KingdomFactory makeFactory(KingdomType type) {
switch (type) {
case ELF:
return new ElfKingdomFactory();
case ORC:
return new OrcKingdomFactory();
default:
throw new IllegalArgumentException("KingdomType not supported.");
}
}
}
}

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,12 +20,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
/**
*
* KingdomFactory factory interface.
*
*/
public interface KingdomFactory {

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,16 +20,15 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
/**
*
* OrcArmy
*
* OrcArmy.
*/
public class OrcArmy implements Army {
static final String DESCRIPTION = "This is the Orc Army!";
static final String DESCRIPTION = "This is the orc army!";
@Override
public String getDescription() {

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,16 +20,15 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
/**
*
* OrcCastle
*
* OrcCastle.
*/
public class OrcCastle implements Castle {
static final String DESCRIPTION = "This is the Orc castle!";
static final String DESCRIPTION = "This is the orc castle!";
@Override
public String getDescription() {

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,16 +20,15 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
/**
*
* OrcKing
*
* OrcKing.
*/
public class OrcKing implements King {
static final String DESCRIPTION = "This is the Orc king!";
static final String DESCRIPTION = "This is the orc king!";
@Override
public String getDescription() {

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,23 +20,25 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
/**
*
* OrcKingdomFactory concrete factory.
*
*/
public class OrcKingdomFactory implements KingdomFactory {
@Override
public Castle createCastle() {
return new OrcCastle();
}
@Override
public King createKing() {
return new OrcKing();
}
@Override
public Army createArmy() {
return new OrcArmy();
}

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,65 +20,74 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.jupiter.api.Test;
import org.junit.Before;
import org.junit.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* Test for abstract factory
* Tests for abstract factory.
*/
public class AbstractFactoryTest {
class AbstractFactoryTest {
private App app = new App();
private KingdomFactory elfFactory;
private KingdomFactory orcFactory;
@Before
public void setUp() {
elfFactory = new ElfKingdomFactory();
orcFactory = new OrcKingdomFactory();
}
private final App app = new App();
@Test
public void king() {
final King elfKing = app.getKing(elfFactory);
void verifyKingCreation() {
app.createKingdom(Kingdom.FactoryMaker.KingdomType.ELF);
final var kingdom = app.getKingdom();
final var elfKing = kingdom.getKing();
assertTrue(elfKing instanceof ElfKing);
assertEquals(ElfKing.DESCRIPTION, elfKing.getDescription());
final King orcKing = app.getKing(orcFactory);
app.createKingdom(Kingdom.FactoryMaker.KingdomType.ORC);
final var orcKing = kingdom.getKing();
assertTrue(orcKing instanceof OrcKing);
assertEquals(OrcKing.DESCRIPTION, orcKing.getDescription());
}
@Test
public void castle() {
final Castle elfCastle = app.getCastle(elfFactory);
void verifyCastleCreation() {
app.createKingdom(Kingdom.FactoryMaker.KingdomType.ELF);
final var kingdom = app.getKingdom();
final var elfCastle = kingdom.getCastle();
assertTrue(elfCastle instanceof ElfCastle);
assertEquals(ElfCastle.DESCRIPTION, elfCastle.getDescription());
final Castle orcCastle = app.getCastle(orcFactory);
app.createKingdom(Kingdom.FactoryMaker.KingdomType.ORC);
final var orcCastle = kingdom.getCastle();
assertTrue(orcCastle instanceof OrcCastle);
assertEquals(OrcCastle.DESCRIPTION, orcCastle.getDescription());
}
@Test
public void army() {
final Army elfArmy = app.getArmy(elfFactory);
void verifyArmyCreation() {
app.createKingdom(Kingdom.FactoryMaker.KingdomType.ELF);
final var kingdom = app.getKingdom();
final var elfArmy = kingdom.getArmy();
assertTrue(elfArmy instanceof ElfArmy);
assertEquals(ElfArmy.DESCRIPTION, elfArmy.getDescription());
final Army orcArmy = app.getArmy(orcFactory);
app.createKingdom(Kingdom.FactoryMaker.KingdomType.ORC);
final var orcArmy = kingdom.getArmy();
assertTrue(orcArmy instanceof OrcArmy);
assertEquals(OrcArmy.DESCRIPTION, orcArmy.getDescription());
}
@Test
public void createElfKingdom() {
app.createKingdom(elfFactory);
final King king = app.getKing();
final Castle castle = app.getCastle();
final Army army = app.getArmy();
void verifyElfKingdomCreation() {
app.createKingdom(Kingdom.FactoryMaker.KingdomType.ELF);
final var kingdom = app.getKingdom();
final var king = kingdom.getKing();
final var castle = kingdom.getCastle();
final var army = kingdom.getArmy();
assertTrue(king instanceof ElfKing);
assertEquals(ElfKing.DESCRIPTION, king.getDescription());
assertTrue(castle instanceof ElfCastle);
@ -88,11 +97,13 @@ public class AbstractFactoryTest {
}
@Test
public void createOrcKingdom() {
app.createKingdom(orcFactory);
final King king = app.getKing();
final Castle castle = app.getCastle();
final Army army = app.getArmy();
void verifyOrcKingdomCreation() {
app.createKingdom(Kingdom.FactoryMaker.KingdomType.ORC);
final var kingdom = app.getKingdom();
final var king = kingdom.getKing();
final var castle = kingdom.getCastle();
final var army = kingdom.getArmy();
assertTrue(king instanceof OrcKing);
assertEquals(OrcKing.DESCRIPTION, king.getDescription());
assertTrue(castle instanceof OrcCastle);

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,19 +20,21 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.abstractfactory;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
/**
* Tests that Abstract Factory example runs without errors.
* Check whether the execution of the main method in {@link App} throws an exception.
*/
public class AppTest {
class AppTest {
@Test
public void test() throws IOException {
String[] args = {};
App.main(args);
void shouldExecuteApplicationWithoutException() {
assertDoesNotThrow(() -> App.main(new String[]{}));
}
}

130
active-object/README.md Normal file
View File

@ -0,0 +1,130 @@
---
layout: pattern
title: Active Object
folder: active-object
permalink: /patterns/active-object/
categories: Concurrency
language: en
tags:
- Performance
---
## Intent
The active object design pattern decouples method execution from method invocation for objects that each reside in their thread of control. The goal is to introduce concurrency, by using asynchronous method invocation, and a scheduler for handling requests.
## Explanation
The class that implements the active object pattern will contain a self-synchronization mechanism without using 'synchronized' methods.
Real-world example
>The Orcs are known for their wildness and untameable soul. It seems like they have their own thread of control based on previous behavior.
To implement a creature that has its own thread of control mechanism and expose its API only and not the execution itself, we can use the Active Object pattern.
**Programmatic Example**
```java
public abstract class ActiveCreature{
private final Logger logger = LoggerFactory.getLogger(ActiveCreature.class.getName());
private BlockingQueue<Runnable> requests;
private String name;
private Thread thread;
public ActiveCreature(String name) {
this.name = name;
this.requests = new LinkedBlockingQueue<Runnable>();
thread = new Thread(new Runnable() {
@Override
public void run() {
while (true) {
try {
requests.take().run();
} catch (InterruptedException e) {
logger.error(e.getMessage());
}
}
}
}
);
thread.start();
}
public void eat() throws InterruptedException {
requests.put(new Runnable() {
@Override
public void run() {
logger.info("{} is eating!",name());
logger.info("{} has finished eating!",name());
}
}
);
}
public void roam() throws InterruptedException {
requests.put(new Runnable() {
@Override
public void run() {
logger.info("{} has started to roam the wastelands.",name());
}
}
);
}
public String name() {
return this.name;
}
}
```
We can see that any class that will extend the ActiveCreature class will have its own thread of control to invoke and execute methods.
For example, the Orc class:
```java
public class Orc extends ActiveCreature {
public Orc(String name) {
super(name);
}
}
```
Now, we can create multiple creatures such as Orcs, tell them to eat and roam, and they will execute it on their own thread of control:
```java
public static void main(String[] args) {
var app = new App();
app.run();
}
@Override
public void run() {
ActiveCreature creature;
try {
for (int i = 0;i < creatures;i++) {
creature = new Orc(Orc.class.getSimpleName().toString() + i);
creature.eat();
creature.roam();
}
Thread.sleep(1000);
} catch (InterruptedException e) {
logger.error(e.getMessage());
}
Runtime.getRuntime().exit(1);
}
```
## Class diagram
![alt text](./etc/active-object.urm.png "Active Object class diagram")
## Tutorials
* [Android and Java Concurrency: The Active Object Pattern](https://www.youtube.com/watch?v=Cd8t2u5Qmvc)

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -0,0 +1,25 @@
@startuml
package com.iluwatar.activeobject {
abstract class ActiveCreature {
- logger : Logger
- name : String
- requests : BlockingQueue<Runnable>
- thread : Thread
+ ActiveCreature(name : String)
+ eat()
+ name() : String
+ roam()
}
class App {
- creatures : Integer
- logger : Logger
+ App()
+ main(args : String[]) {static}
+ run()
}
class Orc {
+ Orc(name : String)
}
}
Orc --|> ActiveCreature
@enduml

62
active-object/pom.xml Normal file
View File

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License
Copyright © 2014-2021 Ilkka Seppälä
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.iluwatar</groupId>
<artifactId>java-design-patterns</artifactId>
<version>1.26.0-SNAPSHOT</version>
</parent>
<artifactId>active-object</artifactId>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Maven assembly plugin is invoked with default setting which we have
in parent pom and specifying the class having main method -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<configuration>
<archive>
<manifest>
<mainClass>com.iluwatar.activeobject.App</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,118 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.activeobject;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* ActiveCreature class is the base of the active object example.
* @author Noam Greenshtain
*
*/
public abstract class ActiveCreature {
private static final Logger logger = LoggerFactory.getLogger(ActiveCreature.class.getName());
private BlockingQueue<Runnable> requests;
private String name;
private Thread thread; // Thread of execution.
private int status; // status of the thread of execution.
/**
* Constructor and initialization.
*/
protected ActiveCreature(String name) {
this.name = name;
this.status = 0;
this.requests = new LinkedBlockingQueue<>();
thread = new Thread(() -> {
boolean infinite = true;
while (infinite) {
try {
requests.take().run();
} catch (InterruptedException e) {
if (this.status != 0) {
logger.error("Thread was interrupted. --> {}", e.getMessage());
}
infinite = false;
Thread.currentThread().interrupt();
}
}
});
thread.start();
}
/**
* Eats the porridge.
* @throws InterruptedException due to firing a new Runnable.
*/
public void eat() throws InterruptedException {
requests.put(() -> {
logger.info("{} is eating!",name());
logger.info("{} has finished eating!",name());
});
}
/**
* Roam the wastelands.
* @throws InterruptedException due to firing a new Runnable.
*/
public void roam() throws InterruptedException {
requests.put(() ->
logger.info("{} has started to roam in the wastelands.",name())
);
}
/**
* Returns the name of the creature.
* @return the name of the creature.
*/
public String name() {
return this.name;
}
/**
* Kills the thread of execution.
* @param status of the thread of execution. 0 == OK, the rest is logging an error.
*/
public void kill(int status) {
this.status = status;
this.thread.interrupt();
}
/**
* Returns the status of the thread of execution.
* @return the status of the thread of execution.
*/
public int getStatus() {
return this.status;
}
}

View File

@ -0,0 +1,75 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.activeobject;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The Active Object pattern helps to solve synchronization difficulties without using
* 'synchronized' methods. The active object will contain a thread-safe data structure
* (such as BlockingQueue) and use to synchronize method calls by moving the logic of the method
* into an invocator(usually a Runnable) and store it in the DSA.
*
* <p>In this example, we fire 20 threads to modify a value in the target class.
*/
public class App implements Runnable {
private static final Logger logger = LoggerFactory.getLogger(App.class.getName());
private static final int NUM_CREATURES = 3;
/**
* Program entry point.
*
* @param args command line arguments.
*/
public static void main(String[] args) {
var app = new App();
app.run();
}
@Override
public void run() {
List<ActiveCreature> creatures = new ArrayList<>();
try {
for (int i = 0;i < NUM_CREATURES;i++) {
creatures.add(new Orc(Orc.class.getSimpleName() + i));
creatures.get(i).eat();
creatures.get(i).roam();
}
Thread.sleep(1000);
} catch (InterruptedException e) {
logger.error(e.getMessage());
Thread.currentThread().interrupt();
} finally {
for (int i = 0;i < NUM_CREATURES;i++) {
creatures.get(i).kill(0);
}
}
}
}

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,20 +20,18 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.chain;
import org.junit.Test;
package com.iluwatar.activeobject;
/**
*
* Application test
* An implementation of the ActiveCreature class.
* @author Noam Greenshtain
*
*/
public class AppTest {
public class Orc extends ActiveCreature {
@Test
public void test() {
String[] args = {};
App.main(args);
public Orc(String name) {
super(name);
}
}

View File

@ -0,0 +1,42 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.activeobject;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
class ActiveCreatureTest {
@Test
void executionTest() throws InterruptedException {
ActiveCreature orc = new Orc("orc1");
assertEquals("orc1",orc.name());
assertEquals(0,orc.getStatus());
orc.eat();
orc.roam();
orc.kill(0);
}
}

View File

@ -0,0 +1,37 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.activeobject;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import org.junit.jupiter.api.Test;
class AppTest {
@Test
void shouldExecuteApplicationWithoutException() {
assertDoesNotThrow(() -> App.main(new String[]{}));
}
}

165
acyclic-visitor/README.md Normal file
View File

@ -0,0 +1,165 @@
---
layout: pattern
title: Acyclic Visitor
folder: acyclic-visitor
permalink: /patterns/acyclic-visitor/
categories: Behavioral
language: en
tags:
- Extensibility
---
## Intent
Allow new functions to be added to existing class hierarchies without affecting those hierarchies, and without creating
the troublesome dependency cycles that are inherent to the GoF Visitor Pattern.
## Explanation
Real world example
> We have a hierarchy of modem classes. The modems in this hierarchy need to be visited by an external algorithm based
> on filtering criteria (is it Unix or DOS compatible modem).
In plain words
> Acyclic Visitor allows functions to be added to existing class hierarchies without modifying the hierarchies.
[WikiWikiWeb](https://wiki.c2.com/?AcyclicVisitor) says
> The Acyclic Visitor pattern allows new functions to be added to existing class hierarchies without affecting those
> hierarchies, and without creating the dependency cycles that are inherent to the GangOfFour VisitorPattern.
**Programmatic Example**
Here's the `Modem` hierarchy.
```java
public abstract class Modem {
public abstract void accept(ModemVisitor modemVisitor);
}
public class Zoom extends Modem {
...
@Override
public void accept(ModemVisitor modemVisitor) {
if (modemVisitor instanceof ZoomVisitor) {
((ZoomVisitor) modemVisitor).visit(this);
} else {
LOGGER.info("Only ZoomVisitor is allowed to visit Zoom modem");
}
}
}
public class Hayes extends Modem {
...
@Override
public void accept(ModemVisitor modemVisitor) {
if (modemVisitor instanceof HayesVisitor) {
((HayesVisitor) modemVisitor).visit(this);
} else {
LOGGER.info("Only HayesVisitor is allowed to visit Hayes modem");
}
}
}
```
Next we introduce the `ModemVisitor` hierarchy.
```java
public interface ModemVisitor {
}
public interface HayesVisitor extends ModemVisitor {
void visit(Hayes hayes);
}
public interface ZoomVisitor extends ModemVisitor {
void visit(Zoom zoom);
}
public interface AllModemVisitor extends ZoomVisitor, HayesVisitor {
}
public class ConfigureForDosVisitor implements AllModemVisitor {
...
@Override
public void visit(Hayes hayes) {
LOGGER.info(hayes + " used with Dos configurator.");
}
@Override
public void visit(Zoom zoom) {
LOGGER.info(zoom + " used with Dos configurator.");
}
}
public class ConfigureForUnixVisitor implements ZoomVisitor {
...
@Override
public void visit(Zoom zoom) {
LOGGER.info(zoom + " used with Unix configurator.");
}
}
```
Finally, here are the visitors in action.
```java
var conUnix = new ConfigureForUnixVisitor();
var conDos = new ConfigureForDosVisitor();
var zoom = new Zoom();
var hayes = new Hayes();
hayes.accept(conDos);
zoom.accept(conDos);
hayes.accept(conUnix);
zoom.accept(conUnix);
```
Program output:
```
// Hayes modem used with Dos configurator.
// Zoom modem used with Dos configurator.
// Only HayesVisitor is allowed to visit Hayes modem
// Zoom modem used with Unix configurator.
```
## Class diagram
![alt text](./etc/acyclic-visitor.png "Acyclic Visitor")
## Applicability
This pattern can be used:
* When you need to add a new function to an existing hierarchy without the need to alter or affect that hierarchy.
* When there are functions that operate upon a hierarchy, but which do not belong in the hierarchy itself. e.g. the ConfigureForDOS / ConfigureForUnix / ConfigureForX issue.
* When you need to perform very different operations on an object depending upon its type.
* When the visited class hierarchy will be frequently extended with new derivatives of the Element class.
* When the recompilation, relinking, retesting or redistribution of the derivatives of Element is very expensive.
## Tutorial
* [Acyclic Visitor Pattern Example](https://codecrafter.blogspot.com/2012/12/the-acyclic-visitor-pattern.html)
## Consequences
The good:
* No dependency cycles between class hierarchies.
* No need to recompile all the visitors if a new one is added.
* Does not cause compilation failure in existing visitors if class hierarchy has a new member.
The bad:
* Violates [Liskov's Substitution Principle](https://java-design-patterns.com/principles/#liskov-substitution-principle) by showing that it can accept all visitors but actually only being interested in particular visitors.
* Parallel hierarchy of visitors has to be created for all members in visitable class hierarchy.
## Related patterns
* [Visitor Pattern](https://java-design-patterns.com/patterns/visitor/)
## Credits
* [Acyclic Visitor by Robert C. Martin](http://condor.depaul.edu/dmumaugh/OOT/Design-Principles/acv.pdf)
* [Acyclic Visitor in WikiWikiWeb](https://wiki.c2.com/?AcyclicVisitor)

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -0,0 +1,53 @@
@startuml
package com.iluwatar.acyclicvisitor {
interface AllModemVisitor {
}
class App {
+ App()
+ main(args : String[]) {static}
}
class ConfigureForDosVisitor {
- LOGGER : Logger {static}
+ ConfigureForDosVisitor()
+ visit(hayes : Hayes)
+ visit(zoom : Zoom)
}
class ConfigureForUnixVisitor {
- LOGGER : Logger {static}
+ ConfigureForUnixVisitor()
+ visit(zoom : Zoom)
}
class Hayes {
- LOGGER : Logger {static}
+ Hayes()
+ accept(modemVisitor : ModemVisitor)
+ toString() : String
}
interface HayesVisitor {
+ visit(Hayes) {abstract}
}
abstract class Modem {
+ Modem()
+ accept(ModemVisitor) {abstract}
}
interface ModemVisitor {
}
class Zoom {
- LOGGER : Logger {static}
+ Zoom()
+ accept(modemVisitor : ModemVisitor)
+ toString() : String
}
interface ZoomVisitor {
+ visit(Zoom) {abstract}
}
}
AllModemVisitor --|> ZoomVisitor
AllModemVisitor --|> HayesVisitor
ConfigureForDosVisitor ..|> AllModemVisitor
ConfigureForUnixVisitor ..|> ZoomVisitor
Hayes --|> Modem
HayesVisitor --|> ModemVisitor
Zoom --|> Modem
ZoomVisitor --|> ModemVisitor
@enduml

87
acyclic-visitor/pom.xml Normal file
View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License
Copyright © 2014-2021 Ilkka Seppälä
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.iluwatar</groupId>
<artifactId>java-design-patterns</artifactId>
<version>1.26.0-SNAPSHOT</version>
</parent>
<artifactId>acyclic-visitor</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.9.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/uk.org.lidalia/slf4j-test -->
<dependency>
<groupId>uk.org.lidalia</groupId>
<artifactId>slf4j-test</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Maven assembly plugin is invoked with default setting which we have
in parent pom and specifying the class having main method -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<configuration>
<archive>
<manifest>
<mainClass>com.iluwatar.acyclicvisitor.App</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

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

View File

@ -0,0 +1,54 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.acyclicvisitor;
/**
* The Acyclic Visitor pattern allows new functions to be added to existing class hierarchies
* without affecting those hierarchies, and without creating the dependency cycles that are inherent
* to the GoF Visitor pattern, by making the Visitor base class degenerate
*
* <p>In this example the visitor base class is {@link ModemVisitor}. The base class of the visited
* hierarchy is {@link Modem} and has two children {@link Hayes} and {@link Zoom} each one having
* its own visitor interface {@link HayesVisitor} and {@link ZoomVisitor} respectively. {@link
* ConfigureForUnixVisitor} and {@link ConfigureForDosVisitor} implement each derivative's visit
* method only if it is required
*/
public class App {
/**
* Program's entry point.
*/
public static void main(String[] args) {
var conUnix = new ConfigureForUnixVisitor();
var conDos = new ConfigureForDosVisitor();
var zoom = new Zoom();
var hayes = new Hayes();
hayes.accept(conDos); // Hayes modem with Dos configurator
zoom.accept(conDos); // Zoom modem with Dos configurator
hayes.accept(conUnix); // Hayes modem with Unix configurator
zoom.accept(conUnix); // Zoom modem with Unix configurator
}
}

View File

@ -0,0 +1,44 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.acyclicvisitor;
import lombok.extern.slf4j.Slf4j;
/**
* ConfigureForDosVisitor class implements both zoom's and hayes' visit method for Dos
* manufacturer.
*/
@Slf4j
public class ConfigureForDosVisitor implements AllModemVisitor {
@Override
public void visit(Hayes hayes) {
LOGGER.info(hayes + " used with Dos configurator.");
}
@Override
public void visit(Zoom zoom) {
LOGGER.info(zoom + " used with Dos configurator.");
}
}

View File

@ -0,0 +1,39 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.acyclicvisitor;
import lombok.extern.slf4j.Slf4j;
/**
* ConfigureForUnixVisitor class implements zoom's visit method for Unix manufacturer, unlike
* traditional visitor pattern, this class may selectively implement visit for other modems.
*/
@Slf4j
public class ConfigureForUnixVisitor implements ZoomVisitor {
@Override
public void visit(Zoom zoom) {
LOGGER.info(zoom + " used with Unix configurator.");
}
}

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,39 +20,35 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.command;
package com.iluwatar.acyclicvisitor;
import lombok.extern.slf4j.Slf4j;
/**
*
* InvisibilitySpell is a concrete command
*
* Hayes class implements its accept method.
*/
public class InvisibilitySpell extends Command {
private Target target;
@Slf4j
public class Hayes implements Modem {
/**
* Accepts all visitors but honors only HayesVisitor.
*/
@Override
public void execute(Target target) {
target.setVisibility(Visibility.INVISIBLE);
this.target = target;
}
@Override
public void undo() {
if (target != null) {
target.setVisibility(Visibility.VISIBLE);
}
}
@Override
public void redo() {
if (target != null) {
target.setVisibility(Visibility.INVISIBLE);
public void accept(ModemVisitor modemVisitor) {
if (modemVisitor instanceof HayesVisitor) {
((HayesVisitor) modemVisitor).visit(this);
} else {
LOGGER.info("Only HayesVisitor is allowed to visit Hayes modem");
}
}
/**
* Hayes' modem's toString method.
*/
@Override
public String toString() {
return "Invisibility spell";
return "Hayes modem";
}
}

View File

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

View File

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

View File

@ -0,0 +1,32 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.acyclicvisitor;
/**
* ModemVisitor interface does not contain any visit methods so that it does not depend on the
* visited hierarchy. Each derivative's visit method is declared in its own visitor interface
*/
public interface ModemVisitor {
// Visitor is a degenerate base class for all visitors.
}

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,44 +20,34 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.semaphore;
package com.iluwatar.acyclicvisitor;
import lombok.extern.slf4j.Slf4j;
/**
* Fruit is a resource stored in a FruitBowl.
* Zoom class implements its accept method.
*/
public class Fruit {
@Slf4j
public class Zoom implements Modem {
/**
* Enumeration of Fruit Types
* Accepts all visitors but honors only ZoomVisitor.
*/
public static enum FruitType {
ORANGE, APPLE, LEMON
}
private FruitType type;
public Fruit(FruitType type) {
this.type = type;
}
public FruitType getType() {
return type;
}
/**
* toString method
*/
public String toString() {
switch (type) {
case ORANGE:
return "Orange";
case APPLE:
return "Apple";
case LEMON:
return "Lemon";
default:
return "";
@Override
public void accept(ModemVisitor modemVisitor) {
if (modemVisitor instanceof ZoomVisitor) {
((ZoomVisitor) modemVisitor).visit(this);
} else {
LOGGER.info("Only ZoomVisitor is allowed to visit Zoom modem");
}
}
/**
* Zoom modem's toString method.
*/
@Override
public String toString() {
return "Zoom modem";
}
}

View File

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

View File

@ -0,0 +1,47 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.acyclicvisitor;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
/**
* Tests that the Acyclic Visitor example runs without errors.
*/
class AppTest {
/**
* Issue: Add at least one assertion to this test case.
*
* Solution: Inserted assertion to check whether the execution of the main method in {@link App}
* throws an exception.
*/
@Test
void shouldExecuteApplicationWithoutException() {
assertDoesNotThrow(() -> App.main(new String[]{}));
}
}

View File

@ -0,0 +1,70 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.acyclicvisitor;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.groups.Tuple.tuple;
import static uk.org.lidalia.slf4jext.Level.INFO;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import uk.org.lidalia.slf4jtest.TestLogger;
import uk.org.lidalia.slf4jtest.TestLoggerFactory;
/**
* ConfigureForDosVisitor test class
*/
class ConfigureForDosVisitorTest {
private final TestLogger logger = TestLoggerFactory.getTestLogger(ConfigureForDosVisitor.class);
@Test
void testVisitForZoom() {
var conDos = new ConfigureForDosVisitor();
var zoom = new Zoom();
conDos.visit(zoom);
assertThat(logger.getLoggingEvents())
.extracting("level", "message")
.contains(tuple(INFO, zoom + " used with Dos configurator."));
}
@Test
void testVisitForHayes() {
var conDos = new ConfigureForDosVisitor();
var hayes = new Hayes();
conDos.visit(hayes);
assertThat(logger.getLoggingEvents())
.extracting("level", "message")
.contains(tuple(INFO, hayes + " used with Dos configurator."));
}
@AfterEach
public void clearLoggers() {
TestLoggerFactory.clear();
}
}

View File

@ -0,0 +1,58 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.acyclicvisitor;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import uk.org.lidalia.slf4jtest.TestLogger;
import uk.org.lidalia.slf4jtest.TestLoggerFactory;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.groups.Tuple.tuple;
import static uk.org.lidalia.slf4jext.Level.INFO;
/**
* ConfigureForUnixVisitor test class
*/
class ConfigureForUnixVisitorTest {
private static final TestLogger LOGGER = TestLoggerFactory.getTestLogger(ConfigureForUnixVisitor.class);
@AfterEach
public void clearLoggers() {
TestLoggerFactory.clear();
}
@Test
void testVisitForZoom() {
var conUnix = new ConfigureForUnixVisitor();
var zoom = new Zoom();
conUnix.visit(zoom);
assertThat(LOGGER.getLoggingEvents())
.extracting("level", "message")
.contains(tuple(INFO, zoom + " used with Unix configurator."));
}
}

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,32 +20,35 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.semaphore;
import org.junit.Test;
import static org.junit.Assert.*;
package com.iluwatar.acyclicvisitor;
import org.junit.jupiter.api.Test;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.*;
/**
* Test taking from and putting Fruit into a FruitBowl
* Hayes test class
*/
public class FruitBowlTest {
class HayesTest {
@Test
public void fruitBowlTest() {
FruitBowl fbowl = new FruitBowl();
assertEquals(fbowl.countFruit(), 0);
for (int i = 1; i <= 10; i++) {
fbowl.put(new Fruit(Fruit.FruitType.LEMON));
assertEquals(fbowl.countFruit(), i);
}
void testAcceptForDos() {
var hayes = new Hayes();
var mockVisitor = mock(ConfigureForDosVisitor.class);
for (int i = 9; i >= 0; i--) {
assertNotNull(fbowl.take());
assertEquals(fbowl.countFruit(), i);
}
hayes.accept(mockVisitor);
verify((HayesVisitor) mockVisitor).visit(eq(hayes));
}
assertNull(fbowl.take());
@Test
void testAcceptForUnix() {
var hayes = new Hayes();
var mockVisitor = mock(ConfigureForUnixVisitor.class);
hayes.accept(mockVisitor);
verifyZeroInteractions(mockVisitor);
}
}

View File

@ -0,0 +1,55 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.acyclicvisitor;
import org.junit.jupiter.api.Test;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
/**
* Zoom test class
*/
class ZoomTest {
@Test
void testAcceptForDos() {
var zoom = new Zoom();
var mockVisitor = mock(ConfigureForDosVisitor.class);
zoom.accept(mockVisitor);
verify((ZoomVisitor) mockVisitor).visit(eq(zoom));
}
@Test
void testAcceptForUnix() {
var zoom = new Zoom();
var mockVisitor = mock(ConfigureForUnixVisitor.class);
zoom.accept(mockVisitor);
verify((ZoomVisitor) mockVisitor).visit(eq(zoom));
}
}

View File

@ -3,48 +3,128 @@ layout: pattern
title: Adapter
folder: adapter
permalink: /patterns/adapter/
pumlid: DSR14S8m30J0Lg20M7-wEMnDOiPMFDA9j0yyUEtUkzMHJTF7xI1NF4GSLzaxZtncgDVJgCPIpobzv0N2vOKtjgRHTziMI7KBcOXl10thfxB-Nz9dMJd71m00
categories: Structural
language: en
tags:
- Java
- Gang Of Four
- Difficulty-Beginner
- Gang of Four
---
## Also known as
Wrapper
## Intent
Convert the interface of a class into another interface the clients
expect. Adapter lets classes work together that couldn't otherwise because of
incompatible interfaces.
Convert the interface of a class into another interface the clients expect. Adapter lets classes work together that
couldn't otherwise because of incompatible interfaces.
![alt text](./etc/adapter.png "Adapter")
## Explanation
## General usage of Adapter Pattern:
+ Wrappers used to adopt 3rd parties libraries and frameworks - most of the applications using third party libraries use adapters as a middle layer between the application and the 3rd party library to decouple the application from the library. If another library has to be used only an adapter for the new library is required without having to change the application code.
Real-world example
> Consider that you have some pictures on your memory card and you need to transfer them to your computer. To transfer them, you need some kind of adapter that is compatible with your computer ports so that you can attach a memory card to your computer. In this case card reader is an adapter.
> Another example would be the famous power adapter; a three-legged plug can't be connected to a two-pronged outlet, it needs to use a power adapter that makes it compatible with the two-pronged outlets.
> Yet another example would be a translator translating words spoken by one person to another
In plain words
> Adapter pattern lets you wrap an otherwise incompatible object in an adapter to make it compatible with another class.
Wikipedia says
> In software engineering, the adapter pattern is a software design pattern that allows the interface of an existing class to be used as another interface. It is often used to make existing classes work with others without modifying their source code.
**Programmatic Example**
Consider a captain that can only use rowing boats and cannot sail at all.
First, we have interfaces `RowingBoat` and `FishingBoat`
```java
public interface RowingBoat {
void row();
}
@Slf4j
public class FishingBoat {
public void sail() {
LOGGER.info("The fishing boat is sailing");
}
}
```
And captain expects an implementation of `RowingBoat` interface to be able to move
```java
public class Captain {
private final RowingBoat rowingBoat;
// default constructor and setter for rowingBoat
public Captain(RowingBoat rowingBoat) {
this.rowingBoat = rowingBoat;
}
public void row() {
rowingBoat.row();
}
}
```
Now let's say the pirates are coming and our captain needs to escape but there is only a fishing boat available. We need to create an adapter that allows the captain to operate the fishing boat with his rowing boat skills.
```java
@Slf4j
public class FishingBoatAdapter implements RowingBoat {
private final FishingBoat boat;
public FishingBoatAdapter() {
boat = new FishingBoat();
}
@Override
public void row() {
boat.sail();
}
}
```
And now the `Captain` can use the `FishingBoat` to escape the pirates.
```java
var captain = new Captain(new FishingBoatAdapter());
captain.row();
```
## Class diagram
![alt text](./etc/adapter.urm.png "Adapter class diagram")
## Applicability
Use the Adapter pattern when
* you want to use an existing class, and its interface does not match the one you need
* you want to create a reusable class that cooperates with unrelated or unforeseen classes, that is, classes that don't necessarily have compatible interfaces
* you need to use several existing subclasses, but it's impractical to adapt their interface by subclassing every one. An object adapter can adapt the interface of its parent class.
* You want to use an existing class, and its interface does not match the one you need
* You want to create a reusable class that cooperates with unrelated or unforeseen classes, that is, classes that don't necessarily have compatible interfaces
* You need to use several existing subclasses, but it's impractical to adapt their interface by subclassing everyone. An object adapter can adapt the interface of its parent class.
* Most of the applications using third-party libraries use adapters as a middle layer between the application and the 3rd party library to decouple the application from the library. If another library has to be used only an adapter for the new library is required without having to change the application code.
## Consequences:
## Tutorials
* [Dzone](https://dzone.com/articles/adapter-design-pattern-in-java)
* [Refactoring Guru](https://refactoring.guru/design-patterns/adapter/java/example)
* [Baeldung](https://www.baeldung.com/java-adapter-pattern)
## Consequences
Class and object adapters have different trade-offs. A class adapter
* adapts Adaptee to Target by committing to a concrete Adaptee class. As a consequence, a class adapter wont work when we want to adapt a class and all its subclasses.
* lets Adapter override some of Adaptees behavior, since Adapter is a subclass of Adaptee.
* introduces only one object, and no additional pointer indirection is needed to get to the adaptee.
* Adapts Adaptee to Target by committing to a concrete Adaptee class. As a consequence, a class adapter wont work when we want to adapt a class and all its subclasses.
* Lets Adapter override some of Adaptees behavior since Adapter is a subclass of Adaptee.
* Introduces only one object, and no additional pointer indirection is needed to get to the adaptee.
An object adapter
* lets a single Adapter work with many Adaptees—that is, the Adaptee itself and all of its subclasses (if any). The Adapter can also add functionality to all Adaptees at once.
* makes it harder to override Adaptee behavior. It will require subclassing Adaptee and making Adapter refer to the subclass rather than the Adaptee itself.
* Lets a single Adapter work with many Adaptees—that is, the Adaptee itself and all of its subclasses (if any). The Adapter can also add functionality to all Adaptees at once.
* Makes it harder to override Adaptee behavior. It will require subclassing Adaptee and making the Adapter refer to the subclass rather than the Adaptee itself.
## Real world examples
## Real-world examples
* [java.util.Arrays#asList()](http://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#asList%28T...%29)
* [java.util.Collections#list()](https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html#list-java.util.Enumeration-)
@ -54,5 +134,7 @@ An object adapter
## Credits
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)
* [J2EE Design Patterns](http://www.amazon.com/J2EE-Design-Patterns-William-Crawford/dp/0596004273/ref=sr_1_2)
* [Design Patterns: Elements of Reusable Object-Oriented Software](https://www.amazon.com/gp/product/0201633612/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0201633612&linkCode=as2&tag=javadesignpat-20&linkId=675d49790ce11db99d90bde47f1aeb59)
* [J2EE Design Patterns](https://www.amazon.com/gp/product/0596004273/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0596004273&linkCode=as2&tag=javadesignpat-20&linkId=48d37c67fb3d845b802fa9b619ad8f31)
* [Head First Design Patterns: A Brain-Friendly Guide](https://www.amazon.com/gp/product/0596007124/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0596007124&linkCode=as2&tag=javadesignpat-20&linkId=6b8b6eea86021af6c8e3cd3fc382cb5b)
* [Refactoring to Patterns](https://www.amazon.com/gp/product/0321213351/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0321213351&linkCode=as2&tag=javadesignpat-20&linkId=2a76fcb387234bc71b1c61150b3cc3a7)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
adapter/etc/adapter.urm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -1,37 +1,31 @@
@startuml
package com.iluwatar.adapter {
class App {
+ App()
- App()
+ main(args : String[]) {static}
}
class BattleFishingBoat {
- LOGGER : Logger {static}
- boat : FishingBoat
+ BattleFishingBoat()
+ fire()
+ move()
}
interface BattleShip {
+ fire() {abstract}
+ move() {abstract}
}
class Captain {
- battleship : BattleShip
- rowingBoat : RowingBoat
+ Captain()
+ Captain(battleship : BattleShip)
+ fire()
+ move()
+ setBattleship(battleship : BattleShip)
+ Captain(boat : RowingBoat)
~ row()
~ setRowingBoat(boat : RowingBoat)
}
class FishingBoat {
~class FishingBoat {
- LOGGER : Logger {static}
+ FishingBoat()
+ fish()
+ sail()
~ FishingBoat()
~ sail()
}
class FishingBoatAdapter {
- boat : FishingBoat
+ FishingBoatAdapter()
+ row()
}
interface RowingBoat {
+ row() {abstract}
}
}
BattleFishingBoat --> "-boat" FishingBoat
Captain --> "-battleship" BattleShip
BattleFishingBoat ..|> BattleShip
Captain ..|> BattleShip
FishingBoatAdapter --> "-boat" FishingBoat
Captain --> "-rowingBoat" RowingBoat
FishingBoatAdapter ..|> RowingBoat
@enduml

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License
Copyright (c) 2014-2016 Ilkka Seppälä
Copyright © 2014-2021 Ilkka Seppälä
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -23,19 +23,18 @@
THE SOFTWARE.
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.iluwatar</groupId>
<artifactId>java-design-patterns</artifactId>
<version>1.16.0</version>
<version>1.26.0-SNAPSHOT</version>
</parent>
<artifactId>adapter</artifactId>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@ -44,4 +43,25 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Maven assembly plugin is invoked with default setting which we have
in parent pom and specifying the class having main method -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<configuration>
<archive>
<manifest>
<mainClass>com.iluwatar.adapter.App</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,6 +20,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.adapter;
/**
@ -28,33 +29,33 @@ package com.iluwatar.adapter;
* The Adapter design pattern allows otherwise incompatible classes to work together by converting
* the interface of one class into an interface expected by the clients.
*
* <p>
* There are two variations of the Adapter pattern: The class adapter implements the adaptee's
* <p>There are two variations of the Adapter pattern: The class adapter implements the adaptee's
* interface whereas the object adapter uses composition to contain the adaptee in the adapter
* object. This example uses the object adapter approach.
*
* <p>
* The Adapter ({@link BattleFishingBoat}) converts the interface of the adaptee class (
* {@link FishingBoat}) into a suitable one expected by the client ( {@link BattleShip} ).
*
* <p>
* The story of this implementation is this. <br>
* Pirates are coming! we need a {@link BattleShip} to fight! We have a {@link FishingBoat} and our
* captain. We have no time to make up a new ship! we need to reuse this {@link FishingBoat}. The
* captain needs a battleship which can fire and move. The spec is in {@link BattleShip}. We will
* use the Adapter pattern to reuse {@link FishingBoat}.
* <p>The Adapter ({@link FishingBoatAdapter}) converts the interface of the adaptee class ({@link
* FishingBoat}) into a suitable one expected by the client ({@link RowingBoat}).
*
* <p>The story of this implementation is this. <br> Pirates are coming! we need a {@link
* RowingBoat} to flee! We have a {@link FishingBoat} and our captain. We have no time to make up a
* new ship! we need to reuse this {@link FishingBoat}. The captain needs a rowing boat which he can
* operate. The spec is in {@link RowingBoat}. We will use the Adapter pattern to reuse {@link
* FishingBoat}.
*/
public class App {
public final class App {
private App() {
}
/**
* Program entry point.
*
* @param args command line args
*/
public static void main(String[] args) {
Captain captain = new Captain(new BattleFishingBoat());
captain.move();
captain.fire();
public static void main(final String[] args) {
// The captain can only operate rowing boats but with adapter he is able to
// use fishing boats as well
var captain = new Captain(new FishingBoatAdapter());
captain.row();
}
}

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,36 +20,25 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.adapter;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* The Captain uses {@link BattleShip} to fight. <br>
* This is the client in the pattern.
* The Captain uses {@link RowingBoat} to sail. <br> This is the client in the pattern.
*/
public class Captain implements BattleShip {
@Setter
@NoArgsConstructor
@AllArgsConstructor
public final class Captain {
private BattleShip battleship;
private RowingBoat rowingBoat;
public Captain() {
}
public Captain(BattleShip battleship) {
this.battleship = battleship;
}
public void setBattleship(BattleShip battleship) {
this.battleship = battleship;
}
@Override
public void fire() {
battleship.fire();
}
@Override
public void move() {
battleship.move();
void row() {
rowingBoat.row();
}
}

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,26 +20,20 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.adapter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
/**
*
* Device class (adaptee in the pattern). We want to reuse this class
*
* Device class (adaptee in the pattern). We want to reuse this class. Fishing boat moves by
* sailing.
*/
public class FishingBoat {
@Slf4j
final class FishingBoat {
private static final Logger LOGGER = LoggerFactory.getLogger(FishingBoat.class);
public void sail() {
LOGGER.info("The Boat is moving to that place");
}
public void fish() {
LOGGER.info("fishing ...");
void sail() {
LOGGER.info("The fishing boat is sailing");
}
}

View File

@ -0,0 +1,37 @@
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.adapter;
/**
* Adapter class. Adapts the interface of the device ({@link FishingBoat}) into {@link RowingBoat}
* interface expected by the client ({@link Captain}).
*/
public class FishingBoatAdapter implements RowingBoat {
private final FishingBoat boat = new FishingBoat();
public final void row() {
boat.sail();
}
}

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,17 +20,14 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.adapter;
/**
* The interface expected by the client.<br>
* A Battleship can fire and move.
*
* The interface expected by the client.<br> A rowing boat is rowed to move.
*/
public interface BattleShip {
public interface RowingBoat {
void fire();
void move();
void row();
}

View File

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

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,10 +20,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.adapter;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.util.HashMap;
import java.util.Map;
@ -32,52 +33,46 @@ import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
/**
* Test class
*
* Tests for the adapter pattern.
*/
public class AdapterPatternTest {
class AdapterPatternTest {
private Map<String, Object> beans;
private static final String BATTLESHIP_BEAN = "engineer";
private static final String FISHING_BEAN = "fisher";
private static final String CAPTAIN_BEAN = "captain";
private static final String ROWING_BEAN = "captain";
/**
* This method runs before the test execution and sets the bean objects in the beans Map.
*/
@Before
@BeforeEach
public void setup() {
beans = new HashMap<>();
BattleFishingBoat battleFishingBoat = spy(new BattleFishingBoat());
beans.put(BATTLESHIP_BEAN, battleFishingBoat);
var fishingBoatAdapter = spy(new FishingBoatAdapter());
beans.put(FISHING_BEAN, fishingBoatAdapter);
Captain captain = new Captain();
captain.setBattleship((BattleFishingBoat) beans.get(BATTLESHIP_BEAN));
beans.put(CAPTAIN_BEAN, captain);
var captain = new Captain();
captain.setRowingBoat((FishingBoatAdapter) beans.get(FISHING_BEAN));
beans.put(ROWING_BEAN, captain);
}
/**
* This test asserts that when we use the move() method on a captain bean(client), it is
* internally calling move method on the battleship object. The Adapter ({@link BattleFishingBoat}
* ) converts the interface of the target class ( {@link FishingBoat}) into a suitable one
* expected by the client ({@link Captain} ).
* This test asserts that when we use the row() method on a captain bean(client), it is internally
* calling sail method on the fishing boat object. The Adapter ({@link FishingBoatAdapter} )
* converts the interface of the target class ( {@link FishingBoat}) into a suitable one expected
* by the client ({@link Captain} ).
*/
@Test
public void testAdapter() {
BattleShip captain = (BattleShip) beans.get(CAPTAIN_BEAN);
void testAdapter() {
var captain = (Captain) beans.get(ROWING_BEAN);
// when captain moves
captain.move();
captain.row();
// the captain internally calls the battleship object to move
BattleShip battleship = (BattleShip) beans.get(BATTLESHIP_BEAN);
verify(battleship).move();
// same with above with firing
captain.fire();
verify(battleship).fire();
var adapter = (RowingBoat) beans.get(FISHING_BEAN);
verify(adapter).row();
}
}

View File

@ -1,6 +1,6 @@
/**
/*
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -20,19 +20,26 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.adapter;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
/**
* Tests that Adapter example runs without errors.
*/
public class AppTest {
class AppTest {
/**
* Check whether the execution of the main method in {@link App}
* throws an exception.
*/
@Test
public void test() throws IOException {
String[] args = {};
App.main(args);
void shouldExecuteApplicationWithoutException() {
assertDoesNotThrow(() -> App.main(new String[]{}));
}
}

View File

@ -3,23 +3,101 @@ layout: pattern
title: Aggregator Microservices
folder: aggregator-microservices
permalink: /patterns/aggregator-microservices/
pumlid: JOov3SCm301NIGQGs7iRXYPa1g8ayB7NjuiKwGvtmBrbKC-Tq_hhY5Y-0HXUjKaS-Kbdepc2HrIQ2jBpma23BvvOTdPfeooCO1iEYlu0O6l63MDQKI6Rp-CKOWSE-ey_NzEqhjH-0m00
categories: Architectural
language: en
tags:
- Java
- Spring
- Cloud distributed
- Decoupling
- Microservices
---
## Intent
The user makes a single call to the Aggregator, and the aggregator then calls each relevant microservice and collects
the data, apply business logic to it, and further publish is as a REST Endpoint.
More variations of the aggregator are:
- Proxy Microservice Design Pattern: A different microservice is called upon the business need.
- Chained Microservice Design Pattern: In this case each microservice is dependent/ chained to a series
of other microservices.
The user makes a single call to the aggregator service, and the aggregator then calls each relevant microservice.
![alt text](./etc/aggregator-microservice.png "Aggregator Microservice")
## Explanation
Real world example
> Our web marketplace needs information about products and their current inventory. It makes a call to an aggregator
> service which in turn calls the product information microservice and product inventory microservice returning the
> combined information.
In plain words
> Aggregator Microservice collects pieces of data from various microservices and returns an aggregate for processing.
Stack Overflow says
> Aggregator Microservice invokes multiple services to achieve the functionality required by the application.
**Programmatic Example**
Let's start from the data model. Here's our `Product`.
```java
public class Product {
private String title;
private int productInventories;
// getters and setters ->
...
}
```
Next we can introduce our `Aggregator` microservice. It contains clients `ProductInformationClient` and
`ProductInventoryClient` for calling respective microservices.
```java
@RestController
public class Aggregator {
@Resource
private ProductInformationClient informationClient;
@Resource
private ProductInventoryClient inventoryClient;
@RequestMapping(path = "/product", method = RequestMethod.GET)
public Product getProduct() {
var product = new Product();
var productTitle = informationClient.getProductTitle();
var productInventory = inventoryClient.getProductInventories();
//Fallback to error message
product.setTitle(requireNonNullElse(productTitle, "Error: Fetching Product Title Failed"));
//Fallback to default error inventory
product.setProductInventories(requireNonNullElse(productInventory, -1));
return product;
}
}
```
Here's the essence of information microservice implementation. Inventory microservice is similar, it just returns
inventory counts.
```java
@RestController
public class InformationController {
@RequestMapping(value = "/information", method = RequestMethod.GET)
public String getProductTitle() {
return "The Product Title.";
}
}
```
Now calling our `Aggregator` REST API returns the product information.
```bash
curl http://localhost:50004/product
{"title":"The Product Title.","productInventories":5}
```
## Class diagram
![alt text](./aggregator-service/etc/aggregator-service.png "Aggregator Microservice")
## Applicability
@ -27,4 +105,6 @@ Use the Aggregator Microservices pattern when you need a unified API for various
## Credits
* [Microservice Design Patterns](http://blog.arungupta.me/microservice-design-patterns/)
* [Microservice Design Patterns](http://web.archive.org/web/20190705163602/http://blog.arungupta.me/microservice-design-patterns/)
* [Microservices Patterns: With examples in Java](https://www.amazon.com/gp/product/1617294543/ref=as_li_qf_asin_il_tl?ie=UTF8&tag=javadesignpat-20&creative=9325&linkCode=as2&creativeASIN=1617294543&linkId=8b4e570267bc5fb8b8189917b461dc60)
* [Architectural Patterns: Uncover essential patterns in the most indispensable realm of enterprise architecture](https://www.amazon.com/gp/product/B077T7V8RC/ref=as_li_qf_asin_il_tl?ie=UTF8&tag=javadesignpat-20&creative=9325&linkCode=as2&creativeASIN=B077T7V8RC&linkId=c34d204bfe1b277914b420189f09c1a4)

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