|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.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 String |
name
The option name. |
protected String |
shortDescription
The short description of the optionn. |
protected T |
value
The value of this option. |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug |
Constructor Summary | |
---|---|
Option(OptionID optionID)
Creates an option which is guaranteed to be have an unique name. |
|
Option(String name,
String description)
Deprecated. use Option(optionID) instead |
Method Summary | |
---|---|
abstract String |
getDescription()
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. |
protected String |
getShortDescription()
Returns the short description of the option. |
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 de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final String name
protected String shortDescription
getDescription()
protected T value
Constructor Detail |
---|
public Option(OptionID optionID)
optionID
- the unique id of the option@Deprecated public Option(String name, String description)
name
- The name of the option.description
- The description of the option.Method Detail |
---|
public String getName()
protected String getShortDescription()
public void setShortDescription(String description)
description
- the short description to be setpublic abstract String getDescription()
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 Exceptionpublic 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.
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |