Package repast.simphony.parameter
Class BeanParameters
java.lang.Object
repast.simphony.parameter.BeanParameters
- All Implemented Interfaces:
Cloneable,Parameters
Implemenentation of Parameters that converts a bean's properties into parameters.
- Author:
- Nick Collier
-
Field Summary
Fields inherited from interface repast.simphony.parameter.Parameters
NULL -
Constructor Summary
ConstructorsConstructorDescriptionBeanParameters(Object bean) BeanParameters(Object bean, Set<String> paramNames) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds listener that will listen for parameter changes on this Parameters.clone()Method to clone a Parameter object.getBean()Gets the bean object that this BeanParameters wraps.getBoolean(String paramName) Gets the Boolean value associated with the specified parameter name.getDisplayName(String paramName) Gets the display name for the specified parameter name.Gets the Double value associated with the specified parameter name.Gets the Float value associated with the specified parameter name.getInteger(String paramName) Gets the Integer value associated with the specified parameter name.Gets the Boolean value associated with the specified parameter name.Gets the Schema for this Parameters object.Gets the String value associated with the specified parameter name.Gets the value associated with the specified parameter name.getValueAsString(String paramName) Gets a String representation of the specified parameter's value.booleanisReadOnly(String paramName) True if parameter is read only.voidRemoves the specified listener from the listeners listening to this Parameters object.voidSets the specified parameter name to the specified value.
-
Constructor Details
-
BeanParameters
-
BeanParameters
-
-
Method Details
-
removePropertyChangeListener
Description copied from interface:ParametersRemoves the specified listener from the listeners listening to this Parameters object.- Specified by:
removePropertyChangeListenerin interfaceParameters
-
addPropertyChangeListener
Description copied from interface:ParametersAdds listener that will listen for parameter changes on this Parameters.- Specified by:
addPropertyChangeListenerin interfaceParameters
-
getSchema
Gets the Schema for this Parameters object.- Specified by:
getSchemain interfaceParameters- Returns:
- the Schema for this Parameters object.
-
clone
Description copied from interface:ParametersMethod to clone a Parameter object.- Specified by:
clonein interfaceParameters- Overrides:
clonein classObject- Returns:
- a Parameter clone.
-
getValue
Gets the value associated with the specified parameter name.- Specified by:
getValuein interfaceParameters- Parameters:
paramName- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-
getValueAsString
Gets a String representation of the specified parameter's value.- Specified by:
getValueAsStringin interfaceParameters- Parameters:
paramName- the name of the parameter- Returns:
- a String representation of the specified parameters's value.
-
setValue
Sets the specified parameter name to the specified value.- Specified by:
setValuein interfaceParameters- Parameters:
paramName- the name of the parameter to set to the new valueval- the new value
-
isReadOnly
True if parameter is read only.- Specified by:
isReadOnlyin interfaceParameters- Parameters:
paramName- the name of the parameter- Returns:
- true if parameter is read-only otherwise false.
-
getBean
Gets the bean object that this BeanParameters wraps.- Returns:
- the bean object that this BeanParameters wraps.
-
getDisplayName
Gets the display name for the specified parameter name.- Specified by:
getDisplayNamein interfaceParameters- Parameters:
paramName- the parameter name- Returns:
- the display name for the specified parameter name.
-
getDouble
Gets the Double value associated with the specified parameter name.- Specified by:
getDoublein interfaceParameters- Parameters:
paramName- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-
getInteger
Gets the Integer value associated with the specified parameter name.- Specified by:
getIntegerin interfaceParameters- Parameters:
paramName- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-
getBoolean
Gets the Boolean value associated with the specified parameter name.- Specified by:
getBooleanin interfaceParameters- Parameters:
paramName- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-
getString
Gets the String value associated with the specified parameter name.- Specified by:
getStringin interfaceParameters- Parameters:
paramName- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-
getLong
Gets the Boolean value associated with the specified parameter name.- Specified by:
getLongin interfaceParameters- Parameters:
paramName- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-
getFloat
Gets the Float value associated with the specified parameter name.- Specified by:
getFloatin interfaceParameters- Parameters:
paramName- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-