java.lang.Object org.nlogo.agent.InputBoxConstraint
public class InputBoxConstraint
Nested Class Summary | |
---|---|
static interface |
InputBoxConstraint.InputBoxTypeInterface
|
Nested classes/interfaces inherited from interface org.nlogo.agent.ValueConstraint |
---|
ValueConstraint.Violation |
Constructor Summary | |
---|---|
InputBoxConstraint(InputBoxConstraint.InputBoxTypeInterface type)
|
|
InputBoxConstraint(Object defaultValue,
InputBoxConstraint.InputBoxTypeInterface type)
|
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. |
Object |
defaultValue()
Returns the default value for this constraint |
void |
defaultValue(Object def)
|
void |
setType(String name)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InputBoxConstraint(InputBoxConstraint.InputBoxTypeInterface type)
public InputBoxConstraint(Object defaultValue, InputBoxConstraint.InputBoxTypeInterface type)
Method Detail |
---|
public void setType(String name)
public Object defaultValue()
ValueConstraint
defaultValue
in interface ValueConstraint
public void defaultValue(Object def)
public void assertConstraint(Object val) throws ValueConstraint.Violation, LogoException
ValueConstraint
assertConstraint
in interface ValueConstraint
ValueConstraint.Violation
LogoException
public Object coerceValue(Object val) throws LogoException
ValueConstraint
coerceValue
in interface ValueConstraint
LogoException