private static Optional < EvaluatedCondition > evaluateCondition ( Condition condition , ValueType type , Comparable value ) { Comparable threshold = getThreshold ( condition , type ) ; if ( reachThreshold ( value , threshold , condition ) ) { return of ( new EvaluatedCondition ( condition , EvaluationStatus . ERROR , value . toString ( ) ) ) ; } return Optional . empty ( ) ; }
Evaluates the error condition . Returns empty if threshold or measure value is not defined .