java.lang.Objectorg.nlogo.agent.InputBoxConstraint
public class InputBoxConstraint
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.nlogo.api.ValueConstraint |
---|
ValueConstraint.Violation |
Constructor Summary | |
---|---|
InputBoxConstraint(String typeName,
Object defaultValue)
|
Method Summary | |
---|---|
void |
assertConstraint(Object val)
Throws a Violation condition if the input is not acceptable. |
Object |
coerceValue(Object val)
Returns the constrained value, which can differ from the input. |
boolean |
correctType(Object obj)
|
Object |
defaultValue()
Returns the default value for this constraint |
void |
defaultValue(Object def)
|
void |
setType(String type,
Object defaultValue)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InputBoxConstraint(String typeName, Object defaultValue)
Method Detail |
---|
public void setType(String type, Object defaultValue)
public boolean correctType(Object obj)
public Object defaultValue()
ValueConstraint
defaultValue
in interface ValueConstraint
public void defaultValue(Object def)
public void assertConstraint(Object val) throws ValueConstraint.Violation
ValueConstraint
assertConstraint
in interface ValueConstraint
ValueConstraint.Violation
public Object coerceValue(Object val)
ValueConstraint
coerceValue
in interface ValueConstraint