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
Interface ParameterSetter

All Known Implementing Classes:
  AbstractParameterSetter, DefaultParameterSetter, RPLParameterSetter

    public interface ParameterSetter

Classes implementing this interface should also have a no-argument constructor.

Version:
  $Revision: 1.5 $ $Date: 2004/11/03 19:51:04 $

Method Summary
`java.util.Hashtable` | `getDefaultModelParameters(SimModel model)` Returns a Hashtable whose keys are parameter names and values are parameter values.
`java.util.ArrayList` | `getDynamicParameterNames()`
`java.lang.Object` | `getParameterValue(java.lang.String name, SimModel model)` Gets the current value of a named parameter.
`boolean` | `hasNext()`
`void` | `init(java.lang.String fileName)` Initialize the setter using the specified fileName.
`boolean` | `isConstant(java.lang.String name)`
`boolean` | `isParameter(java.lang.String name)`
`java.util.Iterator` | `parameterNames()`
`void` | `setModelParameters(SimModel model)` Sets the parameters for the specified model.
`void` | `setNextModelParameters(SimModel model)` Increments the parameters in this ParameterSetter and then sets the model's parameters.

Method Detail

### init

    void init(java.lang.String fileName)
              throws java.io.IOException

  Initialize the setter using the specified fileName. ParameterSetters will most often be created using reflection via a no-arg constructor. This init method functions like a proper constructor.

  Parameters:
    `fileName` - the name of the parameter file
  Throws:
    `java.io.IOException`

### setModelParameters

    void setModelParameters(SimModel model)

  Sets the parameters for the specified model. Sets the model's parameters to the current values of the parameters contained by this ParameterSetter.

  Parameters:
    `model` - the model whose parameters are set

### setNextModelParameters

    void setNextModelParameters(SimModel model)

  Increments the parameters in this ParameterSetter and then sets the model's parameters.

  Parameters:
    `model` - the model whose parameters are set

### hasNext

    boolean hasNext()

  Returns:
    true if the parameter space described by this ParameterSetter has more parameter combinations to be explored; false if not.

### getDynamicParameterNames

    java.util.ArrayList getDynamicParameterNames()

  Returns:
    a list of the names dynamic (non-constant) parameters defined in this ParameterSetter.

### isParameter

    boolean isParameter(java.lang.String name)

  Parameters:
    `name` - the name of the parameter to test
  Returns:
    true if the specified name is the name of a parameter in this ParameterSetter; otherwise false.

### isConstant

    boolean isConstant(java.lang.String name)

  Parameters:
    `name` - the name of the parameter to test
  Returns:
    true if the specified name is the name of a constant parameter in this ParameterSetter. false if the named parameter is not constant or if the named parameter is not found.

### getParameterValue

    java.lang.Object getParameterValue(java.lang.String name,
                                       SimModel model)

  Gets the current value of a named parameter. A reference to the model may be necessary for those ParameterSetters whose formats allow for some interaction with the model.

  Parameters:
    `name` - the name of the parameter
    `model` - a reference to the SimModel associated with these parameters
  Returns:
    the current value of the named parameter. Returns null if the parameter is not found.

### parameterNames

    java.util.Iterator parameterNames()

  Returns:
    An iterator returning the names of the parameters contained in this ParameterSetter.

### getDefaultModelParameters

    java.util.Hashtable getDefaultModelParameters(SimModel model)

  Returns a Hashtable whose keys are parameter names and values are parameter values. The parameters themselves are those specified by the model in `getInitParam` with the addition of the random seed and the value is the current parameter file value if the parameter exists in the parameter file. If not, then the value is that of the model.

  Parameters:
    `model` - the model whose parameters we want to get
  Returns:
    a Hashtable whose keys are parameter names and values are parameter values.

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