@startuml package com.iluwatar.filterer.domain { interface Filterer { + by(Predicate) : G {abstract} } } package com.iluwatar.filterer { class App { - LOGGER : Logger {static} + App() - filteringSimpleProbableThreats() {static} - filteringSimpleThreats() {static} + main(args : String[]) {static} } } package com.iluwatar.filterer.threat { interface ProbabilisticThreatAwareSystem { + filtered() : Filterer {abstract} + threats() : List {abstract} } interface ProbableThreat { + probability() : double {abstract} } class SimpleProbabilisticThreatAwareSystem { - systemId : String - threats : ImmutableList + SimpleProbabilisticThreatAwareSystem(systemId : String, threats : List) + equals(o : Object) : boolean + filtered() : Filterer - filteredGroup(predicate : Predicate) : ProbabilisticThreatAwareSystem - filteredItems(predicate : Predicate) : List + hashCode() : int + systemId() : String + threats() : List + toString() : String } class SimpleProbableThreat { - probability : double + SimpleProbableThreat(name : String, id : int, threatType : ThreatType, probability : double) + equals(o : Object) : boolean + hashCode() : int + probability() : double + toString() : String } class SimpleThreat { - id : int - name : String - threatType : ThreatType + SimpleThreat(threatType : ThreatType, id : int, name : String) + id() : int + name() : String + toString() : String + type() : ThreatType } class SimpleThreatAwareSystem { - issues : ImmutableList - systemId : String + SimpleThreatAwareSystem(systemId : String, issues : List) + equals(o : Object) : boolean + filtered() : Filterer - filteredGroup(predicate : Predicate) : ThreatAwareSystem - filteredItems(predicate : Predicate) : List + hashCode() : int + systemId() : String + threats() : List + toString() : String } interface Threat { + id() : int {abstract} + name() : String {abstract} + type() : ThreatType {abstract} } interface ThreatAwareSystem { + filtered() : Filterer {abstract} + systemId() : String {abstract} + threats() : List {abstract} } enum ThreatType { + ROOTKIT {static} + TROJAN {static} + WORM {static} + valueOf(name : String) : ThreatType {static} + values() : ThreatType[] {static} } } SimpleThreatAwareSystem --> "-issues" Threat SimpleThreat --> "-threatType" ThreatType SimpleProbabilisticThreatAwareSystem --> "-threats" ProbableThreat ProbabilisticThreatAwareSystem --|> ThreatAwareSystem ProbableThreat --|> Threat SimpleProbabilisticThreatAwareSystem ..|> ProbabilisticThreatAwareSystem SimpleProbableThreat ..|> ProbableThreat SimpleProbableThreat --|> SimpleThreat SimpleThreat ..|> Threat SimpleThreatAwareSystem ..|> ThreatAwareSystem @enduml