|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.commons.param.AbstractParameter<Double>
org.opensha.commons.param.impl.DoubleDiscreteParameter
public class DoubleDiscreteParameter
Title: DoubleDiscreteParameter
Description: Identical to the DoubleParameter except the constraints are a finite set of valid Double choices instead of a Min/Max DoubleConstraint with all possible values allowed in between.
DoubleParameter,
DependentParameter,
Parameter,
Parameter,
Serialized Form| Field Summary | |
|---|---|
protected static String |
C
Class name for debugging. |
protected static boolean |
D
If true print out debug statements. |
| 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 | |
|---|---|
DoubleDiscreteParameter(String name)
Constructor for the DoubleDiscreteParameter object. |
|
DoubleDiscreteParameter(String name,
ArrayList doubles)
Constructor for the DoubleDiscreteParameter object |
|
DoubleDiscreteParameter(String name,
ArrayList doubles,
Double value)
Constructor for the DoubleDiscreteParameter object |
|
DoubleDiscreteParameter(String name,
ArrayList doubles,
String units)
Constructor for the DoubleDiscreteParameter object |
|
DoubleDiscreteParameter(String name,
ArrayList doubles,
String units,
Double value)
Constructor for the DoubleDiscreteParameter object |
|
DoubleDiscreteParameter(String name,
Double value)
No constraints specified, all values allowed * |
|
DoubleDiscreteParameter(String name,
DoubleDiscreteConstraint constraint)
Constructor for the DoubleDiscreteParameter object |
|
DoubleDiscreteParameter(String name,
DoubleDiscreteConstraint constraint,
Double value)
Constructor for the DoubleDiscreteParameter object |
|
DoubleDiscreteParameter(String name,
DoubleDiscreteConstraint constraint,
String units)
Constructor for the DoubleDiscreteParameter object |
|
DoubleDiscreteParameter(String name,
DoubleDiscreteConstraint constraint,
String units,
Double value)
This is the main constructor. |
|
DoubleDiscreteParameter(String name,
String units)
Constructor for the DoubleDiscreteParameter object No constraints specified, all values allowed. |
|
DoubleDiscreteParameter(String name,
String units,
Double value)
Constructor for the DoubleDiscreteParameter object |
|
| Method Summary | |
|---|---|
Object |
clone()
Returns a copy so you can't edit or damage the original. |
List<Double> |
getAllowedDoubles()
Returns a clone of all allowed values. |
ParameterEditor<Double> |
getEditor()
Returns the Editor for this Parameter. |
String |
getType()
Gets the type attribute of the DoubleDiscreteParameter object. |
void |
setConstraint(ParameterConstraint constraint)
Sets the constraint if it is a DoubleDiscreteConstraint and the parameter is currently editable. |
boolean |
setIndividualParamValueFromXML(Element el)
This should set the value of this individual parameter. |
| 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 java.lang.Comparable |
|---|
compareTo |
| Methods inherited from interface org.opensha.commons.metadata.XMLSaveable |
|---|
toXMLMetadata |
| Field Detail |
|---|
protected static final String C
protected static final boolean D
| Constructor Detail |
|---|
public DoubleDiscreteParameter(String name)
name - Name of this parameter
public DoubleDiscreteParameter(String name,
String units)
name - Name of this parameterunits - Units string for this parameter
public DoubleDiscreteParameter(String name,
ArrayList doubles)
throws ConstraintException
name - Name of this parameterdoubles - List of allowed doubles
ConstraintException - Description of the Exception
public DoubleDiscreteParameter(String name,
ArrayList doubles,
String units)
throws ConstraintException
name - Name of this parameterdoubles - List of allowed doublesunits - Units string for this parameter
ConstraintException - Description of the Exception
public DoubleDiscreteParameter(String name,
DoubleDiscreteConstraint constraint)
throws ConstraintException
name - Name of this parameterconstraint - List of allowed doubles
ConstraintException - Description of the Exception
public DoubleDiscreteParameter(String name,
DoubleDiscreteConstraint constraint,
String units)
throws ConstraintException
name - Name of this parameterconstraint - List of allowed doublesunits - Units string for this parameter
ConstraintException - Description of the Exception
public DoubleDiscreteParameter(String name,
Double value)
name - Name for this parametervalue - The value to set this parameter to
public DoubleDiscreteParameter(String name,
String units,
Double value)
throws ConstraintException
name - Name for this parameterunits - Units for this parametervalue - The value to set this parameter to
ConstraintException - Thrown if value not allowed
public DoubleDiscreteParameter(String name,
ArrayList doubles,
Double value)
throws ConstraintException
name - Name for this parametervalue - The value to set this parameter todoubles - list of allowed values
ConstraintException - Thrown if value not allowed
public DoubleDiscreteParameter(String name,
ArrayList doubles,
String units,
Double value)
throws ConstraintException
name - Name for this parameterunits - Units for this parametervalue - The value to set this parameter todoubles - list of allowed values
ConstraintException - Thrown if value not allowed
public DoubleDiscreteParameter(String name,
DoubleDiscreteConstraint constraint,
Double value)
throws ConstraintException
name - Name for this parameterconstraint - List of allowed valuesvalue - The value to set this parameter to
ConstraintException - Thrown if value not allowed
public DoubleDiscreteParameter(String name,
DoubleDiscreteConstraint constraint,
String units,
Double value)
throws ConstraintException
name - Name for this parameterconstraint - List of allowed valuesunits - Units for this parametervalue - The value to set this parameter to
ConstraintException - Thrown if value not allowed| Method Detail |
|---|
public void setConstraint(ParameterConstraint constraint)
throws ParameterException,
EditableException
setConstraint in interface Parameter<Double>setConstraint in class AbstractParameter<Double>constraint - The new constraint object
ParameterException - Thrown if constraint is not a DoubleDiscreteConstraint
EditableException - Thrown if Parameter is currently uneditable.public String getType()
getType in interface Parameter<Double>getType in class AbstractParameter<Double>public List<Double> getAllowedDoubles()
public Object clone()
clone in interface Parameter<Double>clone in class AbstractParameter<Double>public boolean setIndividualParamValueFromXML(Element el)
AbstractParameter
setIndividualParamValueFromXML 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 | |||||||||