|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.commons.param.AbstractParameter<E>
org.opensha.sha.imr.param.PropagationEffectParams.PropagationEffectParameter<Double>
org.opensha.sha.imr.param.PropagationEffectParams.WarningDoublePropagationEffectParameter
public abstract class WarningDoublePropagationEffectParameter
Title: WarningDoublePropagationEffectParameter
Description: Base Propagation Effect Parameter that implements the WarningParameterAPI. This class is only needed and distinct from the WarningDoubleParameter because multiple inheritance is not supported in Java. These PropagationEffect Parameters need a different base class (PropagationEffectParameter) than the WarningDoubleParameter ( DoubleParameter ). It basically has the same functionality. See WarningDoublepParameter for further documentation.
| Field Summary | |
|---|---|
protected boolean |
ignoreWarning
Set to true to turn off warnings, will automatically set the value, unless exceeds Absolute contrsints. |
protected DoubleConstraint |
warningConstraint
The warning constraint for this Parameter. |
protected ArrayList |
warningListeners
Listeners that are interested in receiveing warnings when the warning constraints are exceeded. |
| Fields inherited from class org.opensha.sha.imr.param.PropagationEffectParams.PropagationEffectParameter |
|---|
C, D, eqkRupture, site |
| 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 |
| Fields inherited from interface org.opensha.commons.metadata.XMLSaveable |
|---|
XML_METADATA_NAME |
| Constructor Summary | |
|---|---|
WarningDoublePropagationEffectParameter()
|
|
| Method Summary | |
|---|---|
void |
addParameterChangeWarningListener(ParameterChangeWarningListener listener)
Adds a listener to receive warning events when the warning constraints are exceeded. |
abstract Object |
clone()
Standard Java function. |
int |
compareTo(Parameter<?> obj)
Compares the values to if this is less than, equal to, or greater than the comparing objects. |
boolean |
equals(Object obj)
Compares value to see if equal. |
void |
fireParameterChangeWarning(ParameterChangeWarningEvent event)
Notifes all listeners of a ChangeWarningEvent has occured. |
ParameterEditor<Double> |
getEditor()
Returns the Editor for this Parameter. |
AbstractParameterConstraint |
getWarningConstraint()
Returns the warning constraint. |
Double |
getWarningMax()
Returns the maximum allowed value of the constraint object. |
Double |
getWarningMin()
Gets the min value of the constraint object. |
boolean |
isIgnoreWarning()
Returns warning constraint enabled/disabled. |
boolean |
isRecommended(Double obj)
Uses the constraint object to determine if the new value being set is within recommended range. |
void |
removeParameterChangeWarningListener(ParameterChangeWarningListener listener)
Adds a listener to receive warning events when the warning constraints are exceeded. |
void |
setIgnoreWarning(boolean ignoreWarning)
Set to true to turn off warnings, will automatically set the value, unless exceeds Absolute contrsints. |
void |
setValue(Double value)
Set's the parameter's value. |
void |
setValueIgnoreWarning(Double value)
Set's the parameter's value bypassing all checks including the absolute constraint check. |
void |
setWarningConstraint(AbstractParameterConstraint warningConstraint)
Sets the constraint if it is a DoubleConstraint and the parameter is currently editable. |
| Methods inherited from class org.opensha.sha.imr.param.PropagationEffectParams.PropagationEffectParameter |
|---|
calcValueFromSiteAndEqkRup, getType, getValue, setValue |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opensha.commons.data.Named |
|---|
getName |
| Methods inherited from interface org.opensha.commons.metadata.XMLSaveable |
|---|
toXMLMetadata |
| Field Detail |
|---|
protected DoubleConstraint warningConstraint
protected transient ArrayList warningListeners
protected boolean ignoreWarning
| Constructor Detail |
|---|
public WarningDoublePropagationEffectParameter()
| Method Detail |
|---|
public void setIgnoreWarning(boolean ignoreWarning)
setIgnoreWarning in interface WarningParameter<Double>public boolean isIgnoreWarning()
isIgnoreWarning in interface WarningParameter<Double>
public void addParameterChangeWarningListener(ParameterChangeWarningListener listener)
throws EditableException
addParameterChangeWarningListener in interface WarningParameter<Double>EditableException
public void removeParameterChangeWarningListener(ParameterChangeWarningListener listener)
throws EditableException
removeParameterChangeWarningListener in interface WarningParameter<Double>EditableException
public void setWarningConstraint(AbstractParameterConstraint warningConstraint)
throws ParameterException,
EditableException
setWarningConstraint in interface WarningParameter<Double>warningConstraint - The new constraint for warnings
ParameterException - Thrown if the constraint is not a DoubleConstraint
EditableException - Thrown if the isEditable flag set to false.
public AbstractParameterConstraint getWarningConstraint()
throws ParameterException
getWarningConstraint in interface WarningParameter<Double>ParameterException
public Double getWarningMin()
throws Exception
getWarningMin in interface WarningParameter<Double>Exception - Description of the Exceptionpublic Double getWarningMax()
getWarningMax in interface WarningParameter<Double>
public void setValue(Double value)
throws ConstraintException,
WarningException
setValue in interface Parameter<Double>setValue in class AbstractParameter<Double>value - The new value for this Parameter
ParameterException - Thrown if the object is currenlty not
editable
ConstraintException - Thrown if the object value is not allowed
WarningException
public void setValueIgnoreWarning(Double value)
throws ConstraintException,
ParameterException
setValueIgnoreWarning in interface WarningParameter<Double>value - The new value for this Parameter
ConstraintException - Thrown if the object value is not allowed as determined
by the absolute constraints.
ParameterException - Thrown if the object is currenlty not
editablepublic boolean isRecommended(Double obj)
isRecommended in interface WarningParameter<Double>obj - Object to check if allowed via constraints
public void fireParameterChangeWarning(ParameterChangeWarningEvent event)
fireParameterChangeWarning in interface WarningParameter<Double>public int compareTo(Parameter<?> obj)
compareTo in interface Comparable<Parameter<?>>compareTo in class AbstractParameter<Double>obj - The object to compare this to
ClassCastException - Is thrown if the comparing object is not
a DoubleParameter, or DoubleDiscreteParameter.
public boolean equals(Object obj)
throws ClassCastException
equals in interface Parameter<Double>equals in interface WarningParameter<Double>equals in class AbstractParameter<Double>obj - The object to compare this to
ClassCastException - Is thrown if the comparing object is not
a DoubleParameter, or DoubleDiscreteParameter.public abstract Object clone()
clone in interface Parameter<Double>clone in class AbstractParameter<Double>public ParameterEditor<Double> getEditor()
ParameterEditor for this Parameter. It is
recommended that editors be lazily instantiated.
getEditor in interface Parameter<Double>Editor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||