Package repast.simphony.parameter
Class BoundParameters
java.lang.Object
repast.simphony.parameter.DefaultParameters
repast.simphony.parameter.BoundParameters
- All Implemented Interfaces:
Cloneable
,MutableParameters
,Parameters
Parameters implementation that binds a set of parameters to
those in some bean.
- Version:
- $Revision$ $Date$
- Author:
- Nick Collier
-
Field Summary
Fields inherited from class repast.simphony.parameter.DefaultParameters
changed, nameMap, pcs, readOnly, schema, values
Fields inherited from interface repast.simphony.parameter.Parameters
NULL
-
Constructor Summary
ConstructorDescriptionBoundParameters
(Parameters param) Creates a new BoundParameters using the parameters in the specified Parameters object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addParameter
(String name, String displayName, Class<?> paramClass, Object val, Method readMethod, Method writeMethod) getBean()
Gets the bean that is bound the contained parameters.void
Sets the bean to bind to the contained parameters.void
Sets the specified parameter name to the specified value.Methods inherited from class repast.simphony.parameter.DefaultParameters
addConstraint, addConstraint, addConvertor, addParameter, addParameter, addPropertyChangeListener, clone, getBoolean, getDisplayName, getDouble, getFloat, getInteger, getLong, getSchema, getString, getValue, getValueAsString, isReadOnly, removeParameter, removePropertyChangeListener
-
Constructor Details
-
BoundParameters
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
Gets the bean that is bound the contained parameters.- Returns:
- the bean that is bound the contained parameters.
-
setBean
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
Sets the specified parameter name to the specified value.- Specified by:
setValue
in interfaceParameters
- Overrides:
setValue
in classDefaultParameters
- Parameters:
paramName
- the name of the parameter to set to the new valueval
- the new value
-
addParameter
-
addParameter
-