|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.commons.param.AbstractParameter<List<String>>
org.opensha.commons.param.impl.StringListParameter
public class StringListParameter
Title: StringListParameter.java
Description: String List Parameter that accepts strings as it's values. It is different from String Parameter because we can only set only one String as the value for StringParameter. However, in this case, multiple Strings can be set as value for this parameter. The editor for this parameter is shown as a JList where multiple selections are allowed. If constraints are present, setting the values must pass the constraint check. Since the Parameter class in an ancestor, all Parameter's fields are inherited.
Copyright: Copyright (c) 2002
Company:
| Field Summary | |
|---|---|
protected static String |
C
Class name for debugging. |
| Fields inherited from class org.opensha.commons.param.AbstractParameter |
|---|
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 | |
|---|---|
StringListParameter(String name)
Constructor doesn't specify a constraint, all values allowed. |
|
StringListParameter(String name,
ArrayList strings,
ArrayList values)
Sets the name, vector of string converted to a constraint, amd value. |
|
StringListParameter(String name,
List<String> strings)
Input vector is turned into StringConstraints object. |
|
StringListParameter(String name,
String units,
ArrayList values)
No constraints specified, all values allowed. |
|
StringListParameter(String name,
StringListConstraint constraint)
Constructor that sets the name and Constraint during initialization. |
|
StringListParameter(String name,
StringListConstraint constraint,
ArrayList values)
Sets the name, constraint, and value. |
|
StringListParameter(String name,
StringListConstraint constraint,
String units,
List<String> values)
This is the main constructor. |
|
| Method Summary | |
|---|---|
Object |
clone()
Returns a copy so you can't edit or damage the origial. |
AbstractParameterEditorOld |
getEditor()
Returns the Editor for this Parameter. |
String |
getType()
Gets the type attribute of the StringListParameter object. |
void |
setConstraint(ParameterConstraint constraint)
Sets the constraint reference if it is a StringListConstraint and the parameter is currently editable, else throws an exception. |
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 |
| Field Detail |
|---|
protected static final String C
| Constructor Detail |
|---|
public StringListParameter(String name)
public StringListParameter(String name,
List<String> strings)
throws ConstraintException
name - Name of the parametetstrings - Converted to the Constraint object
ConstraintException - Thrown if vector of allowed values is
empty
ConstraintException - Thrown if vector of allowed values is
empty
public StringListParameter(String name,
StringListConstraint constraint)
throws ConstraintException
name - Name of the parametetconstraint - Constraint object
ConstraintException - Description of the Exception
ConstraintException - Is thrown if the value is not allowed
public StringListParameter(String name,
String units,
ArrayList values)
throws ConstraintException
name - Name of the parameterunits - Units of the parametervalue - value of this parameter
ConstraintException - Description of the Exception
public StringListParameter(String name,
ArrayList strings,
ArrayList values)
throws ConstraintException
name - Name of the parametetstrings - vector of allowed values converted to a
constraintvalue - value of this parameter
ConstraintException - Is thrown if the value is not allowed
ConstraintException - Is thrown if the value is not allowed
public StringListParameter(String name,
StringListConstraint constraint,
ArrayList values)
throws ConstraintException
name - Name of the parametetconstraint - List of allowed valuesvalue - value of this parameter
ConstraintException - Is thrown if the value is not allowed
ConstraintException - Is thrown if the value is not allowed
public StringListParameter(String name,
StringListConstraint constraint,
String units,
List<String> values)
throws ConstraintException
name - Name of the parametetconstraint - Lsit of allowed valuesvalue - value object of this parameterunits - Units of this parameter
ConstraintException - Is thrown if the value is not allowed
ConstraintException - Is thrown if the value is not allowed| Method Detail |
|---|
public void setConstraint(ParameterConstraint constraint)
throws ParameterException,
EditableException
setConstraint in interface Parameter<List<String>>setConstraint in class AbstractParameter<List<String>>constraint - to set
ParameterException
EditableExceptionpublic String getType()
getType in interface Parameter<List<String>>getType in class AbstractParameter<List<String>>public Object clone()
clone in interface Parameter<List<String>>clone in class AbstractParameter<List<String>>public AbstractParameterEditorOld getEditor()
ParameterEditor for this Parameter. It is
recommended that editors be lazily instantiated.
Editorpublic boolean setIndividualParamValueFromXML(Element el)
AbstractParameter
setIndividualParamValueFromXML in class AbstractParameter<List<String>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||