|
1 | 1 | # ☕ Java Design Patterns |
2 | 2 |
|
3 | | -## About |
| 3 | +## Visitor |
4 | 4 |
|
5 | | -This application is a simple Java Console Application that aims to implement design pattern examples to a Programmin Language Class. A set of design patterns will be developed |
6 | | -each week, and they are divided in different [branches](https://github.com/LBeghini/Java-Design-Patterns/branches). |
| 5 | +Visitor pattern is a way to perform operations of a determinated structure build outside the structure. |
7 | 6 |
|
8 | | -The main branch is just a template for every other branch. |
| 7 | +For example, let's say we have a Museum, and we want to see the masterpieces. However, the arts don't come with an exhibit method, and you don't have the rights to change anything inside the classes. |
9 | 8 |
|
10 | | -Also, to make it easier to download the source code, [releases](https://github.com/LBeghini/Java-Design-Patterns/releases) are created related to the task of the week, giving a snapshot of the code for that specific implementation. |
11 | | - |
12 | | -## Implemented design patterns |
13 | | - |
14 | | -### Behavioural patterns |
15 | | - |
16 | | -- [x] [Chain of responsibility](https://github.com/LBeghini/Java-Design-Patterns/tree/4-chain-of-responsibility) |
17 | | -- [x] [Command](https://github.com/LBeghini/Java-Design-Patterns/tree/6-command) |
18 | | -- [x] [Interpreter](https://github.com/LBeghini/Java-Design-Patterns/tree/9-interpreter) |
19 | | -- [x] [Iterator](https://github.com/LBeghini/Java-Design-Patterns/tree/4-iterator) |
20 | | -- [x] [Mediator](https://github.com/LBeghini/Java-Design-Patterns/tree/9-mediator) |
21 | | -- [x] [Memento](https://github.com/LBeghini/Java-Design-Patterns/tree/5-memento) |
22 | | -- [x] [Observer](https://github.com/LBeghini/Java-Design-Patterns/tree/5-observer) |
23 | | -- [x] [State](https://github.com/LBeghini/Java-Design-Patterns/tree/3-state) |
24 | | -- [x] [Strategy](https://github.com/LBeghini/Java-Design-Patterns/tree/6-strategy) |
25 | | -- [x] [Template method](https://github.com/LBeghini/Java-Design-Patterns/tree/4-template-method) |
26 | | - |
27 | | -### Creational patterns |
28 | | - |
29 | | -- [ ] Abstract factory |
30 | | -- [x] [Builder](https://github.com/LBeghini/Java-Design-Patterns/tree/1-builder) |
31 | | -- [x] [Factory method](https://github.com/LBeghini/Java-Design-Patterns/tree/2-factory-method) |
32 | | -- [x] [Prototype](https://github.com/LBeghini/Java-Design-Patterns/tree/2-prototype) |
33 | | -- [x] [Singleton](https://github.com/LBeghini/Java-Design-Patterns/tree/1-singleton) |
34 | | - |
35 | | -### Structural patterns |
36 | | - |
37 | | -- [x] [Adapter](https://github.com/LBeghini/Java-Design-Patterns/tree/7-adapter) |
38 | | -- [x] [Bridge](https://github.com/LBeghini/Java-Design-Patterns/tree/7-bridge) |
39 | | -- [x] [Composite](https://github.com/LBeghini/Java-Design-Patterns/tree/8-composite) |
40 | | -- [ ] Decorator |
41 | | -- [x] [Facade](https://github.com/LBeghini/Java-Design-Patterns/tree/8-facade) |
42 | | -- [x] [Flyweight](https://github.com/LBeghini/Java-Design-Patterns/tree/10-flyweight) |
43 | | -- [x] [Proxy](https://github.com/LBeghini/Java-Design-Patterns/tree/10-proxy) |
44 | | - |
45 | | - |
46 | | -## Technologies |
47 | | - |
48 | | -- Java |
49 | | -- JUnit |
50 | | -- Maven |
51 | | - |
52 | | -## Requirements |
53 | | - |
54 | | -To run and edit the project, be sure to have installed in your computer the following softwares: |
55 | | -- A code editor |
56 | | - |
57 | | -After that, you'll need to clone this repo: |
58 | | - |
59 | | -```bash |
60 | | -git clone https://github.com/LBeghini/Java-Design-Patterns.git |
61 | | -``` |
62 | | - |
63 | | -## Change branch |
64 | | - |
65 | | -To change to a different branch, run the command: |
66 | | - |
67 | | -```bash |
68 | | -git checkout name-of-the-branch |
69 | | -``` |
70 | | - |
71 | | -The branch names have the pattern: |
72 | | - |
73 | | -```bash |
74 | | -{number-of-the-week}-{pattern-name} |
75 | | -``` |
76 | | - |
77 | | -> `number-of-the-week` corresponds to the week asked to be implemented certain pattern |
78 | | -
|
79 | | -## Testing |
80 | | - |
81 | | -This project has no aim to run any of the implemented classes, as the goal is the code itself. However, the classes will be tested to visualize the behaviour and implementation |
82 | | -of the patterns. |
83 | | - |
84 | | -You can run the tests using the maven wrapper: |
85 | | - |
86 | | -```bash |
87 | | -./mvnw test |
88 | | -``` |
89 | | - |
90 | | -## :balance_scale: License |
91 | | - |
92 | | -[MIT License](https://github.com/LBeghini/Java-Design-Patterns/blob/main/LICENSE) |
| 9 | +So you use the Museum as a Visitor to get the exhibitions of the masterpieces. |
0 commit comments