java-design-patterns/command/etc/command.urm.puml

59 lines
1.3 KiB
Plaintext
Raw Normal View History

2019-12-07 18:03:49 +02:00
@startuml
package com.iluwatar.command {
class App {
+ App()
+ main(args : String[]) {static}
}
class Goblin {
+ Goblin()
+ toString() : String
+ changeSize()
+ changeVisibility()
2019-12-07 18:03:49 +02:00
}
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>
2019-12-07 18:03:49 +02:00
+ Wizard()
+ castSpell(Runnable : runnable)
2019-12-07 18:03:49 +02:00
+ redoLastSpell()
+ toString() : String
+ undoLastSpell()
}
}
Target --> "-size" Size
Wizard --> "-changeSize" Goblin
Wizard --> "-changeVisibility" Goblin
2019-12-07 18:03:49 +02:00
Target --> "-visibility" Visibility
2020-08-04 16:34:41 +02:00
Goblin --|> Target
App --> "castSpell" Wizard
2020-08-04 16:34:41 +02:00
@enduml