|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object compbio.metadata.Option<T> compbio.metadata.Parameter<T>
public class Parameter<T>
A single value containing an option supported by the web service e.g. seqType=protein. Where seqType is a optionName and protein is one of possibleValues
Option
,
Argument
Constructor Summary | |
---|---|
Parameter(String name,
String description)
|
Method Summary | |
---|---|
Set<String> |
addOptionNames(String... value)
Adds an option to the optionName list |
Set<String> |
addPossibleValues(String... value)
|
boolean |
equals(Object obj)
|
String |
getOptionName()
|
List<String> |
getPossibleValues()
List is more convenient to work with |
ValueConstrain |
getValidValue()
|
int |
hashCode()
|
void |
setDefaultValue(String defaultVal)
Sets one of the values defined in optionList as default. |
void |
setOptionName(String optionName)
|
void |
setOptionNames(Set<String> optionName)
|
void |
setPossibleValues(Set<String> possibleValues)
|
void |
setValidValue(ValueConstrain validValue)
|
String |
toCommand(String nameValueSeparator)
Convert the option to the command string. |
String |
toString()
|
Methods inherited from class compbio.metadata.Option |
---|
getDefaultValue, getDescription, getFurtherDetails, getName, getOptionNames, isRequired, setDescription, setFurtherDetails, setName, setRequired, setValue |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Parameter(String name, String description)
Method Detail |
---|
public ValueConstrain getValidValue()
public void setValidValue(ValueConstrain validValue)
public String toString()
toString
in class Option<T>
public String toCommand(String nameValueSeparator)
Option
toCommand
in class Option<T>
public boolean equals(Object obj)
equals
in class Option<T>
public List<String> getPossibleValues()
getPossibleValues
in interface Argument<T>
getPossibleValues
in class Option<T>
public void setPossibleValues(Set<String> possibleValues)
public Set<String> addPossibleValues(String... value)
public int hashCode()
hashCode
in class Option<T>
public void setOptionNames(Set<String> optionName)
setOptionNames
in class Option<T>
public Set<String> addOptionNames(String... value)
Option
addOptionNames
in class Option<T>
public String getOptionName()
public void setOptionName(String optionName)
public void setDefaultValue(String defaultVal) throws WrongParameterException
Option
setDefaultValue
in class Option<T>
WrongParameterException
- is thrown if the defaultValue is not found in optionList
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |