org.opensha.sha.imr.param.PropagationEffectParams
Class PropagationEffectParameter<E>

java.lang.Object
  extended by org.opensha.commons.param.AbstractParameter<E>
      extended by org.opensha.sha.imr.param.PropagationEffectParams.PropagationEffectParameter<E>
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Parameter<?>>, Named, XMLSaveable, Parameter<E>, PropagationEffectParameterAPI<E>
Direct Known Subclasses:
AbstractDoublePropEffectParam, WarningDoublePropagationEffectParameter

public abstract class PropagationEffectParameter<E>
extends AbstractParameter<E>
implements PropagationEffectParameterAPI<E>

Title: PropagationEffectParameter

Description: Propagation Effectg Paraemters deal with special subclass of Parameters that are associated with earthquakes, and know how to calculate their own values from having a Site and EqkRupture set.

These values are generally self calculated as opposed t normal Parameters where the values are specifically set calling setValue().

Version:
1.0
Author:
Steven W. Rock
See Also:
Serialized Form

Field Summary
protected static java.lang.String C
           
protected static boolean D
           
protected  EqkRupture eqkRupture
          The EqkRupture used for calculating the PropagationEffect
protected  Site site
          The Site used for calculating the PropagationEffect
 
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
PropagationEffectParameter()
           
 
Method Summary
protected abstract  void calcValueFromSiteAndEqkRup()
          This is called whenever either the Site or EqkRupture has been changed to update the value stored in this parameter.
 java.lang.String getType()
          Returns the EqkRupture associated with this Parameter
 E getValue(EqkRupture eqkRupture, Site site)
          Sets the independent variables (Site and EqkRupture) then calculates and returns the value
 void setValue(EqkRupture eqkRupture, Site site)
          Sets the independent variables (Site and EqkRupture) then calculates the value
 
Methods inherited from class org.opensha.commons.param.AbstractParameter
addIndependentParameter, addParameterChangeFailListener, addParameterChangeListener, checkEditable, clone, compareTo, containsIndependentParameter, equals, firePropertyChange, firePropertyChangeFailed, getConstraint, getConstraintName, getDefaultValue, getDependentParamMetadataString, getIndependentParameter, getIndependentParameterList, getIndependentParametersKey, getInfo, getMetadataString, getName, getNumIndependentParameters, getUnits, getValue, isAllowed, isEditable, isNullAllowed, removeIndependentParameter, removeParameterChangeFailListener, removeParameterChangeListener, setConstraint, setDefaultValue, setDependentParamMetadataString, setIndependentParameters, setIndepParamsFromXML, setIndividualParamValueFromXML, 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
 
Methods inherited from interface org.opensha.commons.param.Parameter
getEditor
 

Field Detail

C

protected static final java.lang.String C
See Also:
Constant Field Values

D

protected static final boolean D
See Also:
Constant Field Values

site

protected Site site
The Site used for calculating the PropagationEffect


eqkRupture

protected EqkRupture eqkRupture
The EqkRupture used for calculating the PropagationEffect

Constructor Detail

PropagationEffectParameter

public PropagationEffectParameter()
Method Detail

getValue

public E getValue(EqkRupture eqkRupture,
                  Site site)
Sets the independent variables (Site and EqkRupture) then calculates and returns the value

Specified by:
getValue in interface PropagationEffectParameterAPI<E>

setValue

public void setValue(EqkRupture eqkRupture,
                     Site site)
Sets the independent variables (Site and EqkRupture) then calculates the value

Specified by:
setValue in interface PropagationEffectParameterAPI<E>

getType

public java.lang.String getType()
Returns the EqkRupture associated with this Parameter

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

calcValueFromSiteAndEqkRup

protected abstract void calcValueFromSiteAndEqkRup()
This is called whenever either the Site or EqkRupture has been changed to update the value stored in this parameter.

Subclasses implement this in their own way. This is what differentiates different subclasses.