public class IntegerValueConstraint extends AbstractValueConstraint
key| Constructor and Description |
|---|
IntegerValueConstraint(java.lang.String key)
Construct an IntegerValueConstraint that has no minimum or maximum.
|
IntegerValueConstraint(java.lang.String key,
int min,
int max)
Construct an IntegerValueConstraint that has a particular range.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDescription()
Get a description of this constraint suitable for use in tooltips.
|
boolean |
isValid(java.lang.String value,
Config config)
Check if a value is valid.
|
getKey, getKeys, isViolated, undefinedIsValidpublic IntegerValueConstraint(java.lang.String key)
key - The key this constraint applies to.public IntegerValueConstraint(java.lang.String key,
int min,
int max)
key - The key this constraint applies to.min - The minimum value of the config entry.max - The maximum value of the config entry.public java.lang.String getDescription()
ConfigConstraintpublic boolean isValid(java.lang.String value,
Config config)
ValueConstraintvalue - The value to check.config - The Config object.