java.lang.Objectorg.nlogo.agent.BooleanConstraint
public class BooleanConstraint
Constraint suitable for Switch variables.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.nlogo.api.ValueConstraint |
|---|
ValueConstraint.Violation |
| Constructor Summary | |
|---|---|
BooleanConstraint()
|
|
BooleanConstraint(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. |
Object |
defaultValue()
Returns the default value for this constraint |
void |
defaultValue(Boolean def)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BooleanConstraint()
public BooleanConstraint(Object defaultValue)
| Method Detail |
|---|
public Object defaultValue()
ValueConstraint
defaultValue in interface ValueConstraintpublic void defaultValue(Boolean def)
public void assertConstraint(Object val)
throws ValueConstraint.Violation
ValueConstraint
assertConstraint in interface ValueConstraintValueConstraint.Violationpublic Object coerceValue(Object val)
ValueConstraint
coerceValue in interface ValueConstraint