org.opensha.commons.param.impl
Class BooleanParameter

java.lang.Object
  extended by org.opensha.commons.param.AbstractParameter<Boolean>
      extended by org.opensha.commons.param.impl.BooleanParameter
All Implemented Interfaces:
Serializable, Comparable<Parameter<?>>, Named, XMLSaveable, Parameter<Boolean>
Direct Known Subclasses:
AftershockParam, ApplyGardnerKnopoffAftershockFilterParam, HangingWallFlagParam, IncludeMagDistFilterParam, SetTRTinIMR_FromSourceParam

public class BooleanParameter
extends AbstractParameter<Boolean>

Title: BooleanParameter

Description: Makes a parameter which is a boolean

Version:
1.0
Author:
: Nitin 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
BooleanParameter(String name)
          No constraints specified for this parameter.
BooleanParameter(String name, Boolean value)
          No constraints specified, all values allowed.
 
Method Summary
 Object clone()
          Returns a copy so you can't edit or damage the original.
 ParameterEditor<Boolean> getEditor()
          Returns the Editor for this Parameter.
 String getType()
          Returns the name of the parameter class
 boolean isNullAllowed()
          Proxy function call to the constraint to see if null values are permitted
 boolean setIndividualParamValueFromXML(Element el)
          Parses the XML element for a boolean value
 
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, getMetadataString, getName, getNumIndependentParameters, getUnits, getValue, isAllowed, isEditable, 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
 

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

BooleanParameter

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

Parameters:
name - Name of the parameter

BooleanParameter

public BooleanParameter(String name,
                        Boolean value)
No constraints specified, all values allowed. Sets the name and value.

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

isNullAllowed

public boolean isNullAllowed()
Description copied from class: AbstractParameter
Proxy function call to the constraint to see if null values are permitted

Specified by:
isNullAllowed in interface Parameter<Boolean>
Overrides:
isNullAllowed in class AbstractParameter<Boolean>

getType

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

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

clone

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

Specified by:
clone in interface Parameter<Boolean>
Specified by:
clone in class AbstractParameter<Boolean>

setIndividualParamValueFromXML

public boolean setIndividualParamValueFromXML(Element el)
Parses the XML element for a boolean value

Specified by:
setIndividualParamValueFromXML in class AbstractParameter<Boolean>
Returns:

getEditor

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

Returns:
the Editor