final Status evaluate ( final Metric metric ) { if ( metric == null || metric . getMetricValue ( ) == null ) { throw new NullPointerException ( "Metric value can't be null" ) ; } IThreshold thr = thresholdsMap . get ( metric . getMetricName ( ) ) ; if ( thr == null ) { return Status . OK ; } return thr . evaluate ( metric ) ; }
Evaluates the passed in metric against the threshold configured inside this evaluator . If the threshold do not refer the passed in metric then it is ignored and the next threshold is checked .