org.lsst.ccs.config
Class Constraints
java.lang.Object
org.lsst.ccs.config.Constraints
public class Constraints
- extends Object
A set of static methods to check constraints.
- Author:
- bamade
|
Method Summary |
static Object |
check(String type,
String value,
String constraints)
|
static Object |
checkConstraints(String type,
String value,
String constraints)
|
static Object |
checkRange(Class thatClass,
String value,
String lower,
String upper)
|
static Object |
checkRange(String type,
String value,
String lower,
String upper)
checks if the value of type is between lower and upper (included). |
static Object |
checkWithControler(String value,
Constraints.Controler controler)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constraints
public Constraints()
check
public static Object check(String type,
String value,
String constraints)
checkConstraints
public static Object checkConstraints(String type,
String value,
String constraints)
checkRange
public static Object checkRange(String type,
String value,
String lower,
String upper)
- checks if the value of type is between lower and upper (included).
- Parameters:
type - a Class Name. the class should have a static factory method valueOf(String val)
(but java.lang.Character is still ok)value - lower - upper -
- Returns:
checkRange
public static Object checkRange(Class thatClass,
String value,
String lower,
String upper)
checkWithControler
public static Object checkWithControler(String value,
Constraints.Controler controler)
Copyright © 2013 LSST. All Rights Reserved.