private static Alert combine_alert_with_past_ ( Alert alert , Map < GroupName , Alert > previous ) { Alert result = Optional . ofNullable ( previous . get ( alert . getName ( ) ) ) . map ( ( prev ) - > prev . extend ( alert ) ) . orElse ( alert ) ; logger . log ( Level . FINE , "emitting alert {0} -> {1}" , new Object [ ] { result . getName ( ) , result . getAlertState ( ) . name ( ) } ) ; return result ; }
Combine a new alert with its previous state .