public abstract class AbstractValueConstraint extends java.lang.Object implements ValueConstraint
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
key
The key this constraint refers to.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractValueConstraint(java.lang.String key)
Construct an AbstractConstrainedConfigValue.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getKey()
Get the key this restraint refers to.
|
java.util.Set<java.lang.String> |
getKeys()
Get the set of keys this constriant applies to.
|
boolean |
isViolated(Config config)
Check if this constraint has been violated.
|
boolean |
undefinedIsValid()
Find out if an undefined value is counted as valid or invalid.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isValid
getDescription
protected AbstractValueConstraint(java.lang.String key)
key
- The key this constraint applies to.public final boolean isViolated(Config config)
ConfigConstraint
isViolated
in interface ConfigConstraint
config
- The Config object.public final java.lang.String getKey()
ValueConstraint
getKey
in interface ValueConstraint
public final java.util.Set<java.lang.String> getKeys()
ConfigConstraint
getKeys
in interface ConfigConstraint
public boolean undefinedIsValid()
ValueConstraint
undefinedIsValid
in interface ValueConstraint