Class SimpleConstraintChecker
- java.lang.Object
-
- org.apache.felix.hc.generalchecks.util.SimpleConstraintChecker
-
public class SimpleConstraintChecker extends Object
Simple check of values against expressions like < N, > N, between two values etc. See the SimpleConstraintCheckerTest for examples.
-
-
Constructor Summary
Constructors Constructor Description SimpleConstraintChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
check(Object inputValue, String constraint)
Check value against expression and report to result
-
-
-
Field Detail
-
GREATER_THAN
public static final String GREATER_THAN
- See Also:
- Constant Field Values
-
LESS_THAN
public static final String LESS_THAN
- See Also:
- Constant Field Values
-
EQUALS
public static final String EQUALS
- See Also:
- Constant Field Values
-
BETWEEN
public static final String BETWEEN
- See Also:
- Constant Field Values
-
AND
public static final String AND
- See Also:
- Constant Field Values
-
CONTAINS
public static final String CONTAINS
- See Also:
- Constant Field Values
-
STARTS_WITH
public static final String STARTS_WITH
- See Also:
- Constant Field Values
-
ENDS_WITH
public static final String ENDS_WITH
- See Also:
- Constant Field Values
-
MATCHES
public static final String MATCHES
- See Also:
- Constant Field Values
-
OLDER_THAN
public static final String OLDER_THAN
- See Also:
- Constant Field Values
-
-
Method Detail
-
check
public boolean check(Object inputValue, String constraint) throws NumberFormatException
Check value against expression and report to result- Parameters:
inputValue
- the value to checkconstraint
- the constraint to check the value against- Returns:
- true if constraint is met
- Throws:
NumberFormatException
-
-