java.lang.Objectorg.nlogo.agent.ChooserConstraint
public class ChooserConstraint
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.nlogo.agent.ValueConstraint |
|---|
ValueConstraint.Violation |
| Constructor Summary | |
|---|---|
ChooserConstraint()
|
|
ChooserConstraint(LogoList acceptedValues)
|
|
ChooserConstraint(LogoList acceptedValues,
int defaultIndex)
|
|
| Method Summary | |
|---|---|
LogoList |
acceptedValues()
|
void |
acceptedValues(LogoList vals)
|
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. |
int |
defaultIndex()
|
void |
defaultIndex(int def)
|
Object |
defaultValue()
Returns the default value for this constraint |
int |
indexForValue(Object value)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChooserConstraint(LogoList acceptedValues,
int defaultIndex)
public ChooserConstraint(LogoList acceptedValues)
public ChooserConstraint()
| Method Detail |
|---|
public LogoList acceptedValues()
public void acceptedValues(LogoList vals)
public Object defaultValue()
ValueConstraint
defaultValue in interface ValueConstraintpublic void defaultIndex(int def)
public int defaultIndex()
public int indexForValue(Object value)
public void assertConstraint(Object val)
throws ValueConstraint.Violation,
LogoException
ValueConstraint
assertConstraint in interface ValueConstraintValueConstraint.Violation
LogoException
public Object coerceValue(Object val)
throws LogoException
ValueConstraint
coerceValue in interface ValueConstraintLogoException