java.lang.Object org.nlogo.agent.SliderConstraint
public abstract class SliderConstraint
Nested Class Summary | |
---|---|
static class |
SliderConstraint.ConstraintCompilerException
|
static class |
SliderConstraint.RuntimeConstraintException
|
Nested classes/interfaces inherited from interface org.nlogo.agent.ValueConstraint |
---|
ValueConstraint.Violation |
Constructor Summary | |
---|---|
SliderConstraint()
|
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(Double defaultValue)
|
Double |
effectiveMaximum()
|
int |
getPrecision()
|
abstract Double |
increment()
|
static SliderConstraint |
makeSliderConstraint(Agent agent,
String minSpec,
String maxSpec,
String incSpec,
Double defValue,
Object owner)
|
abstract Double |
maximum()
|
abstract Double |
minimum()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SliderConstraint()
Method Detail |
---|
public abstract Double minimum() throws LogoException
LogoException
public abstract Double maximum() throws LogoException
LogoException
public abstract Double increment() throws LogoException
LogoException
public Object defaultValue()
ValueConstraint
defaultValue
in interface ValueConstraint
public void defaultValue(Double defaultValue)
public Double effectiveMaximum() throws LogoException
LogoException
public int getPrecision()
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
public static SliderConstraint makeSliderConstraint(Agent agent, String minSpec, String maxSpec, String incSpec, Double defValue, Object owner) throws SliderConstraint.ConstraintCompilerException, LogoException
SliderConstraint.ConstraintCompilerException
LogoException