it.jnrpe.utils
Class ThresholdUtil

java.lang.Object
  extended by it.jnrpe.utils.ThresholdUtil

public class ThresholdUtil
extends Object

Utility class for evaluating threshold This class conforms to the nagios plugin guidelines (http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT). The generalised range format is: [@]start:end Values are interpreted this way:

start and ":" is not required if start=0.

Author:
Massimiliano Ziccardi

Constructor Summary
ThresholdUtil()
           
 
Method Summary
static boolean isValueInRange(String sRange, BigDecimal value)
          Returns true if the value dalue falls into the range sRange
static boolean isValueInRange(String sRange, int iValue)
          Returns true if the value iValue falls into the range sRange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThresholdUtil

public ThresholdUtil()
Method Detail

isValueInRange

public static boolean isValueInRange(String sRange,
                                     int iValue)
Returns true if the value iValue falls into the range sRange

Parameters:
sRange - The range
iValue - The value
Returns:

isValueInRange

public static boolean isValueInRange(String sRange,
                                     BigDecimal value)
Returns true if the value dalue falls into the range sRange

Parameters:
sRange - The range
value - The value
Returns:


Copyright © 2012. All Rights Reserved.