Class BoundParameters

java.lang.Object
repast.simphony.parameter.DefaultParameters
repast.simphony.parameter.BoundParameters
All Implemented Interfaces:
Cloneable, MutableParameters, Parameters

public class BoundParameters extends DefaultParameters
Parameters implementation that binds a set of parameters to those in some bean.
Version:
$Revision$ $Date$
Author:
Nick Collier
  • Constructor Details

    • BoundParameters

      public BoundParameters(Parameters param)
      Creates a new BoundParameters using the parameters in the specified Parameters object.
      Parameters:
      param - parameters whose values we want to copy into this BoundParameters
  • Method Details

    • getBean

      public Object getBean()
      Gets the bean that is bound the contained parameters.
      Returns:
      the bean that is bound the contained parameters.
    • setBean

      public void setBean(Object bean)
      Sets the bean to bind to the contained parameters. This will also set the bean's corresponding properties to the current parameter values.
      Parameters:
      bean - the bean to bind.
    • setValue

      public void setValue(String paramName, Object val)
      Sets the specified parameter name to the specified value.
      Specified by:
      setValue in interface Parameters
      Overrides:
      setValue in class DefaultParameters
      Parameters:
      paramName - the name of the parameter to set to the new value
      val - the new value
    • addParameter

      public void addParameter(String name, String displayName, Class<?> paramClass, Object val, Method readMethod, Method writeMethod)
    • addParameter

      public void addParameter(String name, Class<?> paramClass, Object val, Method readMethod, Method writeMethod)