|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.optionhandling.Option<T>
T - the type of a possible value for this optionpublic abstract class Option<T>
Abstract superclass for specifying program arguments.
| Field Summary | |
|---|---|
protected OptionID |
optionid
The option name. |
protected String |
shortDescription
The short description of the option. |
protected T |
value
The value of this option. |
| Constructor Summary | |
|---|---|
Option(OptionID optionID)
Creates an option which is guaranteed to be have an unique name. |
|
| Method Summary | |
|---|---|
abstract String |
getFullDescription()
Returns the extended description of the option which includes the option's type, the short description and the default value (if specified). |
String |
getName()
Returns the name of the option. |
OptionID |
getOptionID()
Return the OptionID of this option. |
String |
getShortDescription()
Returns the short description of the option. |
abstract String |
getSyntax()
Returns a string representation of the parameter's type (e.g. an IntParameter should
return <int>). |
T |
getValue()
Returns the value of the option. |
abstract boolean |
isSet()
Returns true if the value of the option is set, false otherwise. |
abstract boolean |
isValid(String value)
Checks if the given argument is valid for this option. |
void |
setShortDescription(String description)
Sets the short description of the option. |
abstract void |
setValue(String value)
Sets the value of the option. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final OptionID optionid
protected String shortDescription
getFullDescription()
protected T value
| Constructor Detail |
|---|
public Option(OptionID optionID)
optionID - the unique id of the option| Method Detail |
|---|
public String getName()
public String getShortDescription()
public void setShortDescription(String description)
description - the short description to be setpublic abstract String getFullDescription()
public abstract String getSyntax()
IntParameter should
return <int>).
public abstract boolean isSet()
public abstract void setValue(String value)
throws ParameterException
value - the option's value to be set
ParameterException - if the given value is not a valid value for this option.
public T getValue()
throws UnusedParameterException
UnusedParameterException - is not thrown actually in this class
but subclasses may require allowance to throw this Exception
public abstract boolean isValid(String value)
throws ParameterException
value - option value to be checked
ParameterException - if the given value is not a valid value for this option.public OptionID getOptionID()
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||