Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uchicago.src.sim.parameter.rpl
Class BlockRPLParameter

    java.lang.Object
      uchicago.src.sim.parameter.rpl.AbstractRPLParameter
          uchicago.src.sim.parameter.rpl.AbstractDynamicParameter
              uchicago.src.sim.parameter.rpl.BlockRPLParameter

All Implemented Interfaces:
  RPLParameter

    public class BlockRPLParameter

extends AbstractDynamicParameter

RPLParameter created from a block definition. A BlockRPLParameter has no value of its own and only operates on its children.

Version:
  $Revision: 1.4 $ $Date: 2003/04/10 15:57:47 $

Field Summary

Fields inherited from class uchicago.src.sim.parameter.rpl.AbstractRPLParameter
`childConsts, childParams, convertor, curIndex, getMethod, name, setMethod, type`

Constructor Summary
`BlockRPLParameter(java.lang.String name)` Creates a BlockRPLParameter with the specified name.

Method Summary
`protected java.lang.Object` | `getValue()` Throws an UnsupportedOperationException as a BlockRPLParameter has no value to get.
`protected boolean` | `incrementSelf()` Throws an UnsupportedOperationException as a BlockRPLParameter has no value to increment.
`protected void` | `invokeSet(SimModel model)` Throws an UnsupportedOperationException as a BlockRPLParameter has no value and thus cannot set the parameter of a model to this BlockRPLParameter's current value.
`boolean` | `next()` Increments value of the current child of this BlockRPLParameter.
`void` | `setModelParameter(SimModel model)` Sets the model parameter to the current values of the child RPLParameter of this BlockRPLParameter.
`java.lang.String` | `toString()`

Methods inherited from class uchicago.src.sim.parameter.rpl.AbstractDynamicParameter
`addToParent, reset`

Methods inherited from class uchicago.src.sim.parameter.rpl.AbstractRPLParameter
`addChildConstant, addChildParameter, constantIterator, getName, getValue, parameterIterator`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BlockRPLParameter

    public BlockRPLParameter(java.lang.String name)

  Creates a BlockRPLParameter with the specified name.

  Parameters:
    `name` - the name of the block

Method Detail

### next

    public boolean next()

  Increments value of the current child of this BlockRPLParameter. If that child cannot be incremented, the next child of this BlockRPLParameter is incremented and so on. If no child can be incremented then this returns false.

  Specified by:
    `next` in interface `RPLParameter`
  Overrides:
    `next` in class `AbstractDynamicParameter`
  Returns:
    true if the increment was successful otherwise false.

### invokeSet

    protected void invokeSet(SimModel model)
                      throws RepastException

  Throws an UnsupportedOperationException as a BlockRPLParameter has no value and thus cannot set the parameter of a model to this BlockRPLParameter's current value.

  Specified by:
    `invokeSet` in class `AbstractRPLParameter`
  Parameters:
    `model` -
  Throws:
    `java.lang.UnsupportedOperationException`
    `RepastException` - if the method fails

### getValue

    protected java.lang.Object getValue()

  Throws an UnsupportedOperationException as a BlockRPLParameter has no value to get.

  Specified by:
    `getValue` in class `AbstractRPLParameter`
  Returns:
    the value of this parameter.
  Throws:
    `java.lang.UnsupportedOperationException`

### setModelParameter

    public void setModelParameter(SimModel model)
                           throws RepastException

  Sets the model parameter to the current values of the child RPLParameter of this BlockRPLParameter.

  Specified by:
    `setModelParameter` in interface `RPLParameter`
  Overrides:
    `setModelParameter` in class `AbstractRPLParameter`
  Parameters:
    `model` - the model whose parameter we want to set
  Throws:
    `RepastException` - if there is an error setting the parameter

### incrementSelf

    protected boolean incrementSelf()

  Throws an UnsupportedOperationException as a BlockRPLParameter has no value to increment.

  Specified by:
    `incrementSelf` in class `AbstractDynamicParameter`
  Returns:
    true if the increment was successful (i.e. there was a "next" value), otherwise false.
  Throws:
    `java.lang.UnsupportedOperationException`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD