|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.parameter.rpl.AbstractRPLParameter
uchicago.src.sim.parameter.rpl.AbstractDynamicParameter
uchicago.src.sim.parameter.rpl.NumericRPLParameter
public class NumericRPLParameter
Defines a dynamic numeric parameter. A NumericRPLParameter has a starting value, an ending value and an amount to increment. Every call to "next" will increment the current value by the amount to increment and set the current value to that new value. Once the current value is more than the ending value this will not increment.
| Field Summary |
|---|
| Fields inherited from class uchicago.src.sim.parameter.rpl.AbstractRPLParameter |
|---|
childConsts, childParams, convertor, curIndex, getMethod, name, setMethod, type |
| Constructor Summary | |
|---|---|
NumericRPLParameter(java.lang.String name,
double start,
double end)
Creates a NumericRPLParameter with the specified name, starting value and ending value. |
|
NumericRPLParameter(java.lang.String name,
double start,
double end,
double incr)
Creates a NumericRPLParameter with the specified name, starting value, ending value and amount to increment. |
|
| Method Summary | |
|---|---|
protected java.lang.Object |
getValue()
Returns the current value of this NumericRPLParameter as a Double. |
protected boolean |
incrementSelf()
Increments the current value of this parameter by the amount to increment. |
protected void |
invokeSet(SimModel model)
Invokes the model's appropriate set method with this parameters's current value as an argument. |
void |
reset()
Resets this NumericRPLParameter to its starting value. |
java.lang.String |
toString()
|
| Methods inherited from class uchicago.src.sim.parameter.rpl.AbstractDynamicParameter |
|---|
addToParent, next |
| Methods inherited from class uchicago.src.sim.parameter.rpl.AbstractRPLParameter |
|---|
addChildConstant, addChildParameter, constantIterator, getName, getValue, parameterIterator, setModelParameter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NumericRPLParameter(java.lang.String name,
double start,
double end)
name - the name of the parameterstart - the starting valueend - the ending value
public NumericRPLParameter(java.lang.String name,
double start,
double end,
double incr)
name - the name of the parameterstart - the starting valueend - the ending valueincr - the amount to increment| Method Detail |
|---|
public void reset()
reset in interface RPLParameterreset in class AbstractDynamicParameterprotected boolean incrementSelf()
incrementSelf in class AbstractDynamicParameter
protected void invokeSet(SimModel model)
throws RepastException
invokeSet in class AbstractRPLParametermodel - the model to invoke the set method on
RepastException - if the method failsprotected java.lang.Object getValue()
getValue in class AbstractRPLParameterpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||