* 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
36 lines
794 B
Plaintext
36 lines
794 B
Plaintext
@startuml
|
|
package com.iluwatar.factory {
|
|
class App {
|
|
- LOGGER : Logger {static}
|
|
+ App()
|
|
+ main(args : String[]) {static}
|
|
}
|
|
interface Coin {
|
|
+ getDescription() : String {abstract}
|
|
}
|
|
class CoinFactory {
|
|
+ CoinFactory()
|
|
+ getCoin(type : CoinType) : Coin {static}
|
|
}
|
|
enum CoinType {
|
|
+ COPPER {static}
|
|
+ GOLD {static}
|
|
- constructor : Supplier<Coin>
|
|
+ getConstructor() : Supplier<Coin>
|
|
+ valueOf(name : String) : CoinType {static}
|
|
+ values() : CoinType[] {static}
|
|
}
|
|
class CopperCoin {
|
|
~ DESCRIPTION : String {static}
|
|
+ CopperCoin()
|
|
+ getDescription() : String
|
|
}
|
|
class GoldCoin {
|
|
~ DESCRIPTION : String {static}
|
|
+ GoldCoin()
|
|
+ getDescription() : String
|
|
}
|
|
}
|
|
CopperCoin ..|> Coin
|
|
GoldCoin ..|> Coin
|
|
@enduml |