org.opensha.commons.param.impl
Class ParameterListParameter

java.lang.Object
  extended by org.opensha.commons.param.AbstractParameter<ParameterList>
      extended by org.opensha.commons.param.impl.ParameterListParameter
All Implemented Interfaces:
Serializable, Comparable<Parameter<?>>, Named, XMLSaveable, Parameter<ParameterList>
Direct Known Subclasses:
TreeBranchWeightsParameter

public class ParameterListParameter
extends AbstractParameter<ParameterList>

Title: ParameterListParameter

Description: Make a parameter which is basically a parameterList

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

Field Summary
protected static String C
          Class name for debugging.
protected static boolean D
          If true print out debug statements.
protected static 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
ParameterListParameter(String name)
          No constraints specified for this parameter.
ParameterListParameter(String name, ParameterList paramList)
          No constraints specified, all values allowed.
 
Method Summary
 Object clone()
          Returns a copy so you can't edit or damage the origial.
 ParameterEditor<ParameterList> getEditor()
          Returns the Editor for this Parameter.
 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).
 ParameterList getParameter()
           
 ListIterator getParametersIterator()
          Returns the ListIterator of the parameters included within this parameter
 String getType()
          Returns the name of the parameter class
 boolean setIndividualParamValueFromXML(Element el)
          This should set the value of this individual parameter.
 void setValue(ParameterList value)
          Set's the parameter's value, which is basically a parameterList.
 
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, 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 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 String PARAM_TYPE
See Also:
Constant Field Values
Constructor Detail

ParameterListParameter

public ParameterListParameter(String name)
No constraints specified for this parameter. Sets the name of this parameter.

Parameters:
name - Name of the parameter

ParameterListParameter

public ParameterListParameter(String name,
                              ParameterList paramList)
No constraints specified, all values allowed. Sets the name and value.

Parameters:
name - Name of the parameter
paramList - ParameterList object
Method Detail

setValue

public void setValue(ParameterList value)
              throws ParameterException
Set's the parameter's value, which is basically a parameterList.

Specified by:
setValue in interface Parameter<ParameterList>
Overrides:
setValue in class AbstractParameter<ParameterList>
Parameters:
value - The new value for this Parameter
Throws:
ParameterException - Thrown if the object is currenlty not editable

clone

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

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

getParametersIterator

public ListIterator getParametersIterator()
Returns the ListIterator of the parameters included within this parameter

Returns:

getParameter

public ParameterList getParameter()
Returns:
the parameterList contained in this parameter

getType

public String getType()
Returns the name of the parameter class

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

getMetadataString

public 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<ParameterList>
Overrides:
getMetadataString in class AbstractParameter<ParameterList>
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<ParameterList>
Returns:

getEditor

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

Returns:
the Editor