org.opensha.commons.param.impl
Class LocationListParameter

java.lang.Object
  extended by org.opensha.commons.param.AbstractParameter<LocationList>
      extended by org.opensha.commons.param.impl.LocationListParameter
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Parameter<?>>, Named, XMLSaveable, Parameter<LocationList>

public class LocationListParameter
extends AbstractParameter<LocationList>

Title: LocationListParameter

Description: Make a parameter which is basically a parameterList for location parameters.

Version:
1.0
Author:
: Nitin Gupta and Vipin Gupta
See Also:
Serialized Form

Field Summary
protected static java.lang.String C
          Class name for debugging.
protected static boolean D
          If true print out debug statements.
protected static java.lang.String PARAM_TYPE
           
 
Fields inherited from class org.opensha.commons.param.AbstractParameter
constraint, defaultValue, editable, independentParameters, info, metadataString, name, units, value, XML_COMPLEX_VAL_EL_NAME, XML_GROUP_METADATA_NAME, XML_METADATA_NAME, XML_NULL_VALUE
 
Fields inherited from interface org.opensha.commons.param.Parameter
XML_INDEPENDENT_PARAMS_NAME
 
Constructor Summary
LocationListParameter(java.lang.String name)
          No constraints specified for this parameter.
LocationListParameter(java.lang.String name, LocationList locList)
          No constraints specified, all values allowed.
 
Method Summary
 java.lang.Object clone()
          Returns a copy so you can't edit or damage the origial.
 AbstractParameterEditorOld getEditor()
          Returns the Editor for this Parameter.
 java.lang.String getMetadataString()
          This overrides the getmetadataString() method because the value here does not have an ASCII representation (and we need to know the values of the independent parameter instead).
 LocationList getParameter()
           
 java.lang.String getType()
          Returns the name of the parameter class
 void setAllLocations(ParameterList locationParameters)
           
 boolean setIndividualParamValueFromXML(Element el)
          This should set the value of this individual parameter.
 
Methods inherited from class org.opensha.commons.param.AbstractParameter
addIndependentParameter, addParameterChangeFailListener, addParameterChangeListener, checkEditable, compareTo, containsIndependentParameter, equals, firePropertyChange, firePropertyChangeFailed, getConstraint, getConstraintName, getDefaultValue, getDependentParamMetadataString, getIndependentParameter, getIndependentParameterList, getIndependentParametersKey, getInfo, getName, getNumIndependentParameters, getUnits, getValue, isAllowed, isEditable, isNullAllowed, removeIndependentParameter, removeParameterChangeFailListener, removeParameterChangeListener, setConstraint, setDefaultValue, setDependentParamMetadataString, setIndependentParameters, setIndepParamsFromXML, setInfo, setName, setNonEditable, setUnits, setValue, setValueAsDefault, setValueFromXMLMetadata, toXMLMetadata, toXMLMetadata, unableToSetValue, valueToXML
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

C

protected static final java.lang.String C
Class name for debugging.

See Also:
Constant Field Values

D

protected static final boolean D
If true print out debug statements.

See Also:
Constant Field Values

PARAM_TYPE

protected static final java.lang.String PARAM_TYPE
See Also:
Constant Field Values
Constructor Detail

LocationListParameter

public LocationListParameter(java.lang.String name)
No constraints specified for this parameter. Sets the name of this parameter.

Parameters:
name - Name of the parameter

LocationListParameter

public LocationListParameter(java.lang.String name,
                             LocationList locList)
No constraints specified, all values allowed. Sets the name and value.

Parameters:
name - Name of the parameter
locList - LocationList object
Method Detail

setAllLocations

public void setAllLocations(ParameterList locationParameters)
Parameters:
locationParameters - ParameterList

clone

public java.lang.Object clone()
Returns a copy so you can't edit or damage the origial.

Specified by:
clone in interface Parameter<LocationList>
Specified by:
clone in class AbstractParameter<LocationList>
Returns:
Exact copy of this object's state

getParameter

public LocationList getParameter()
Returns:
the locationList contained in this parameter

getType

public java.lang.String getType()
Returns the name of the parameter class

Specified by:
getType in interface Parameter<LocationList>
Overrides:
getType in class AbstractParameter<LocationList>

getMetadataString

public java.lang.String getMetadataString()
This overrides the getmetadataString() method because the value here does not have an ASCII representation (and we need to know the values of the independent parameter instead).

Specified by:
getMetadataString in interface Parameter<LocationList>
Overrides:
getMetadataString in class AbstractParameter<LocationList>
Returns:
Sstring

setIndividualParamValueFromXML

public boolean setIndividualParamValueFromXML(Element el)
Description copied from class: AbstractParameter
This should set the value of this individual parameter. The values of the independent parameters will be set by the final setValueFromXMLMetadata method

Specified by:
setIndividualParamValueFromXML in class AbstractParameter<LocationList>
Returns:

getEditor

public AbstractParameterEditorOld getEditor()
Description copied from interface: Parameter
Returns the Editor for this Parameter. It is recommended that editors be lazily instantiated.

Returns:
the Editor