.github
abstract-document
etc
abstract-document.png
abstract-document.ucls
abstract-document.urm.puml
src
README.md
pom.xml
abstract-factory
acyclic-visitor
adapter
aggregator-microservices
ambassador
api-gateway
arrange-act-assert
async-method-invocation
balking
bridge
builder
business-delegate
bytecode
caching
callback
chain
circuit-breaker
collection-pipeline
combinator
command
commander
composite
converter
cqrs
dao
data-bus
data-locality
data-mapper
data-transfer-object
decorator
delegation
dependency-injection
dirty-flag
double-buffer
double-checked-locking
double-dispatch
eip-aggregator
eip-message-channel
eip-publish-subscribe
eip-splitter
eip-wire-tap
etc
event-aggregator
event-asynchronous
event-driven-architecture
event-queue
event-sourcing
execute-around
extension-objects
facade
factory-kit
factory-method
feature-toggle
fluentinterface
flux
flyweight
front-controller
game-loop
guarded-suspension
half-sync-half-async
hexagonal
intercepting-filter
interpreter
iterator
layers
lazy-loading
leader-election
leader-followers
marker
master-worker-pattern
mediator
memento
model-view-controller
model-view-presenter
module
monad
monostate
multiton
mute-idiom
mutex
naked-objects
null-object
object-mother
object-pool
observer
page-object
partial-response
pipeline
poison-pill
priority-queue
private-class-data
producer-consumer
promise
property
prototype
proxy
queue-load-leveling
reactor
reader-writer-lock
repository
resource-acquisition-is-initialization
retry
role-object
saga
semaphore
servant
serverless
service-layer
service-locator
sharding
singleton
spatial-partition
specification
state
step-builder
strangler
strategy
subclass-sandbox
template-method
thread-pool
throttling
tls
tolerant-reader
trampoline
twin
typeobjectpattern
unit-of-work
update-method
value-object
visitor
zh
.all-contributorsrc
.gitignore
CONTRIBUTING.MD
LICENSE.md
PULL_REQUEST_TEMPLATE.md
README.md
checkstyle-suppressions.xml
license-plugin-header-style.xml
pom.xml
65 lines
1.6 KiB
Plaintext
65 lines
1.6 KiB
Plaintext
![]() |
@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 {
|
||
|
+ getModel() : Optional<String>
|
||
|
}
|
||
|
interface HasParts {
|
||
|
+ getParts() : Stream<Part>
|
||
|
}
|
||
|
interface HasPrice {
|
||
|
+ getPrice() : Optional<Number>
|
||
|
}
|
||
|
interface HasType {
|
||
|
+ getType() : Optional<String>
|
||
|
}
|
||
|
class Part {
|
||
|
+ Part(properties : Map<String, Object>)
|
||
|
}
|
||
|
}
|
||
|
package com.iluwatar.abstractdocument {
|
||
|
abstract class AbstractDocument {
|
||
|
- properties : Map<String, Object>
|
||
|
# AbstractDocument(properties : Map<String, Object>)
|
||
|
+ children(key : String, constructor : Function<Map<String, Object>, T>) : Stream<T>
|
||
|
+ get(key : String) : Object
|
||
|
+ put(key : String, value : Object)
|
||
|
+ toString() : String
|
||
|
}
|
||
|
class App {
|
||
|
- LOGGER : Logger {static}
|
||
|
+ App()
|
||
|
+ main(args : String[]) {static}
|
||
|
}
|
||
|
interface Document {
|
||
|
+ children(String, Function<Map<String, Object>, T>) : Stream<T> {abstract}
|
||
|
+ get(String) : Object {abstract}
|
||
|
+ put(String, Object) {abstract}
|
||
|
}
|
||
|
}
|
||
|
AbstractDocument ..|> Document
|
||
|
Car ..|> HasModel
|
||
|
Car ..|> HasPrice
|
||
|
Car ..|> HasParts
|
||
|
Car --|> AbstractDocument
|
||
|
HasModel --|> Document
|
||
|
HasParts --|> Document
|
||
|
HasPrice --|> Document
|
||
|
HasType --|> Document
|
||
|
Part ..|> HasType
|
||
|
Part ..|> HasModel
|
||
|
Part ..|> HasPrice
|
||
|
Part --|> AbstractDocument
|
||
|
@enduml
|