Package repast.simphony.parameter
Class EmptyParameters
java.lang.Object
repast.simphony.parameter.EmptyParameters
- All Implemented Interfaces:
Cloneable
,Parameters
Empty place holder parameters object that always returns Parameters.NULL.
- Author:
- Nick Collier
-
Field Summary
Fields inherited from interface repast.simphony.parameter.Parameters
NULL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds listener that will listen for parameter changes on this Parameters.clone()
Method to clone a Parameter object.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 Long 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.boolean
isReadOnly
(String paramName) True if parameter is read only.void
Removes the specified listener from the listeners listening to this Parameters object.void
Sets the specified parameter name to the specified value.
-
Constructor Details
-
EmptyParameters
public EmptyParameters()
-
-
Method Details
-
getSchema
Gets the Schema for this Parameters object.- Specified by:
getSchema
in interfaceParameters
- Returns:
- the Schema for this Parameters object.
-
getValue
Gets the value associated with the specified parameter name. This always returns Parameters.NULL;- Specified by:
getValue
in interfaceParameters
- Parameters:
paramName
- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-
clone
Description copied from interface:Parameters
Method to clone a Parameter object.- Specified by:
clone
in interfaceParameters
- Overrides:
clone
in classObject
- Returns:
- a Parameter clone.
-
getValueAsString
Gets a String representation of the specified parameter's value.- Specified by:
getValueAsString
in interfaceParameters
- Parameters:
paramName
- the name of the parameter- Returns:
- a String representation of the specified parameters's value.
-
getDisplayName
Gets the display name for the specified parameter name.- Specified by:
getDisplayName
in interfaceParameters
- Parameters:
paramName
- the parameter name- Returns:
- the display name for the specified parameter name.
-
setValue
Sets the specified parameter name to the specified value. This is no op in this implementation of Parameters.- Specified by:
setValue
in interfaceParameters
- Parameters:
paramName
- the name of the parameter to set to the new valueval
- the new value
-
addPropertyChangeListener
Description copied from interface:Parameters
Adds listener that will listen for parameter changes on this Parameters.- Specified by:
addPropertyChangeListener
in interfaceParameters
-
removePropertyChangeListener
Description copied from interface:Parameters
Removes the specified listener from the listeners listening to this Parameters object.- Specified by:
removePropertyChangeListener
in interfaceParameters
-
isReadOnly
True if parameter is read only.- Specified by:
isReadOnly
in interfaceParameters
- Parameters:
paramName
- the name of the parameter- Returns:
- true if parameter is read-only otherwise false.
-
getDouble
Description copied from interface:Parameters
Gets the Double value associated with the specified parameter name.- Specified by:
getDouble
in interfaceParameters
- Parameters:
paramName
- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-
getInteger
Description copied from interface:Parameters
Gets the Integer value associated with the specified parameter name.- Specified by:
getInteger
in interfaceParameters
- Parameters:
paramName
- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-
getBoolean
Description copied from interface:Parameters
Gets the Boolean value associated with the specified parameter name.- Specified by:
getBoolean
in interfaceParameters
- Parameters:
paramName
- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-
getString
Description copied from interface:Parameters
Gets the String value associated with the specified parameter name.- Specified by:
getString
in interfaceParameters
- Parameters:
paramName
- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-
getLong
Description copied from interface:Parameters
Gets the Long value associated with the specified parameter name.- Specified by:
getLong
in interfaceParameters
- Parameters:
paramName
- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-
getFloat
Description copied from interface:Parameters
Gets the Float value associated with the specified parameter name.- Specified by:
getFloat
in interfaceParameters
- Parameters:
paramName
- the name of the parameter whose value we want- Returns:
- the value associated with the specified parameter name.
-