@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) } interface HasModel { + getModel() : Optional } interface HasParts { + getParts() : Stream } interface HasPrice { + getPrice() : Optional } interface HasType { + getType() : Optional } class Part { + Part(properties : Map) } } package com.iluwatar.abstractdocument { abstract class AbstractDocument { - properties : Map # AbstractDocument(properties : Map) + children(key : String, constructor : Function, T>) : Stream + 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, T>) : Stream {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