forked from iluwatar/java-design-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommand.urm.puml
More file actions
58 lines (58 loc) · 1.32 KB
/
command.urm.puml
File metadata and controls
58 lines (58 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@startuml
package com.iluwatar.command {
class App {
+ App()
+ main(args : String[]) {static}
}
class Goblin {
+ Goblin()
+ toString() : String
+ changeSize()
+ changeVisibility()
}
enum Size {
+ NORMAL {static}
+ SMALL {static}
- title : String
+ toString() : String
+ valueOf(name : String) : Size {static}
+ values() : Size[] {static}
}
abstract class Target {
- LOGGER : Logger {static}
- size : Size
- visibility : Visibility
+ Target()
+ getSize() : Size
+ getVisibility() : Visibility
+ printStatus()
+ setSize(size : Size)
+ setVisibility(visibility : Visibility)
+ toString() : String {abstract}
}
enum Visibility {
+ INVISIBLE {static}
+ VISIBLE {static}
- title : String
+ toString() : String
+ valueOf(name : String) : Visibility {static}
+ values() : Visibility[] {static}
}
class Wizard {
- LOGGER : Logger {static}
- redoStack : Deque<Runnable>
- undoStack : Deque<Runnable>
+ Wizard()
+ castSpell(Runnable : runnable)
+ redoLastSpell()
+ toString() : String
+ undoLastSpell()
}
}
Target --> "-size" Size
Wizard --> "-changeSize" Goblin
Wizard --> "-changeVisibility" Goblin
Target --> "-visibility" Visibility
Goblin --|> Target
App --> "castSpell" Wizard
@enduml