public class FloatValueConstraint extends AbstractValueConstraint
key| Constructor and Description |
|---|
FloatValueConstraint(java.lang.String key)
Construct a FloatConstrainedConfigValue that has no minimum or maximum.
|
FloatValueConstraint(java.lang.String key,
double min,
double max)
Construct a FloatConstrainedConfigValue 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 FloatValueConstraint(java.lang.String key)
key - The key this constraint applies to.public FloatValueConstraint(java.lang.String key,
double min,
double 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.