org.opensha.commons.param.impl
Class WeightedListParameter<E>

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

public class WeightedListParameter<E>
extends AbstractParameter<WeightedList<E>>

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.opensha.commons.param.AbstractParameter
C, constraint, D, 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
WeightedListParameter(String name, WeightedList<E> value)
           
 
Method Summary
 Object clone()
          Returns a copy so you can't edit or damage the origial.
 ParameterEditor getEditor()
          Returns the Editor for this Parameter.
 String getMetadataString()
           
 boolean isParameterEditorBuilt()
           
 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, getType, 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
 

Constructor Detail

WeightedListParameter

public WeightedListParameter(String name,
                             WeightedList<E> value)
Method Detail

getEditor

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

Returns:
the Editor

isParameterEditorBuilt

public boolean isParameterEditorBuilt()

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<WeightedList<E>>
Returns:

getMetadataString

public String getMetadataString()
Specified by:
getMetadataString in interface Parameter<WeightedList<E>>
Overrides:
getMetadataString in class AbstractParameter<WeightedList<E>>
Returns:
the matadata string for parameter. This function returns the metadata which can be used to reset the values of the parameters created. *NOTE : Look at the function getMetadataXML() which return the values of these parameters in the XML format and can used recreate the parameters from scratch.

clone

public Object clone()
Description copied from class: AbstractParameter
Returns a copy so you can't edit or damage the origial.

Specified by:
clone in interface Parameter<WeightedList<E>>
Specified by:
clone in class AbstractParameter<WeightedList<E>>