@startuml package com.iluwatar.abstractdocument.domain { class Part { + Part(properties : Map) } interface HasPrice { + PROPERTY : String {static} + getPrice() : Optional } interface HasParts { + PROPERTY : String {static} + getParts() : Stream } class Car { + Car(properties : Map) } interface HasType { + PROPERTY : String {static} + getType() : Optional } interface HasModel { + PROPERTY : String {static} + getModel() : Optional } } package com.iluwatar.abstractdocument { class App { + App() + main(args : String[]) {static} } 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 } interface Document { + children(String, Function, T>) : Stream {abstract} + get(String) : Object {abstract} + put(String, Object) {abstract} } } AbstractDocument --+ Map Part ..|> HasType Part ..|> HasModel Part ..|> HasPrice Part --|> AbstractDocument AbstractDocument ..|> Document HasPrice --|> Document HasParts --|> Document Car ..|> HasModel Car ..|> HasPrice Car ..|> HasParts Car --|> AbstractDocument HasType --|> Document HasModel --|> Document @enduml