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