de.lmu.ifi.dbs.elki.utilities.optionhandling
Class OptionID

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.ConstantObject<OptionID>
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.OptionID
All Implemented Interfaces:
Comparable<OptionID>

public final class OptionID
extends ConstantObject<OptionID>

An OptionID is used by option handlers as a unique identifier for specific options. There is no option possible without a specific OptionID defined within this class.


Field Summary
static OptionID ALGORITHM
          OptionID for AlgorithmStep
static OptionID DATABASE
          OptionID for InputStep
static OptionID DATABASE_CONNECTION
          OptionID for InputStep
static OptionID DEBUG
          Optional Parameter to specify a class to enable debugging for.
private  String description
          The description of the OptionID.
static OptionID DESCRIPTION
          Optional Parameter to specify a class to obtain a description for.
static OptionID EVALUATOR
          OptionID for EvaluationStep
static OptionID HELP
          Flag to obtain help-message.
static OptionID HELP_LONG
          Flag to obtain help-message.
static OptionID OUTPUT
          OptionID for the application output file/folder
static OptionID RESULT_HANDLER
          OptionID for OutputStep
static OptionID VERBOSE_FLAG
          Flag to allow verbose messages while running the application.
 
Constructor Summary
private OptionID(String name, String description)
          Provides a new OptionID of the given name and description.
 
Method Summary
 String getDescription()
          Returns the description of this OptionID.
static OptionID getOptionID(String name)
          Returns the OptionID for the given name if it exists, null otherwise.
static OptionID getOrCreateOptionID(String name, String description)
          Gets or creates the OptionID for the given class and given name.
 void setDescription(String description)
          Sets the description of this OptionID.
 String toString()
          Returns the name of this OptionID.
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.ConstantObject
compareTo, equals, getName, hashCode, lookup, readResolve
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

HELP

public static final OptionID HELP
Flag to obtain help-message.

Key: -h


HELP_LONG

public static final OptionID HELP_LONG
Flag to obtain help-message.

Key: -help


ALGORITHM

public static final OptionID ALGORITHM
OptionID for AlgorithmStep


DESCRIPTION

public static final OptionID DESCRIPTION
Optional Parameter to specify a class to obtain a description for.

Key: -description


DEBUG

public static final OptionID DEBUG
Optional Parameter to specify a class to enable debugging for.

Key: -enableDebug


DATABASE

public static final OptionID DATABASE
OptionID for InputStep


DATABASE_CONNECTION

public static final OptionID DATABASE_CONNECTION
OptionID for InputStep


EVALUATOR

public static final OptionID EVALUATOR
OptionID for EvaluationStep


RESULT_HANDLER

public static final OptionID RESULT_HANDLER
OptionID for OutputStep


OUTPUT

public static final OptionID OUTPUT
OptionID for the application output file/folder


VERBOSE_FLAG

public static final OptionID VERBOSE_FLAG
Flag to allow verbose messages while running the application.

Key: -verbose


description

private String description
The description of the OptionID.

Constructor Detail

OptionID

private OptionID(String name,
                 String description)
Provides a new OptionID of the given name and description.

All OptionIDs are unique w.r.t. their name. An OptionID provides additionally a description of the option.

Parameters:
name - the name of the option
description - the description of the option
Method Detail

getDescription

public String getDescription()
Returns the description of this OptionID.

Returns:
the description of this OptionID

setDescription

public void setDescription(String description)
Sets the description of this OptionID.

Parameters:
description - the description to be set

getOrCreateOptionID

public static OptionID getOrCreateOptionID(String name,
                                           String description)
Gets or creates the OptionID for the given class and given name. The OptionID usually is named as the classes name (lowercase) as name-prefix and the given name as suffix of the complete name, separated by a dot. For example, the parameter epsilon for the class DBSCAN will be named dbscan.epsilon.

Parameters:
name - the name
description - the description is also set if the named OptionID does exist already
Returns:
the OptionID for the given name

getOptionID

public static OptionID getOptionID(String name)
Returns the OptionID for the given name if it exists, null otherwise.

Parameters:
name - name of the desired OptionID
Returns:
the OptionID for the given name

toString

public String toString()
Returns the name of this OptionID.

Overrides:
toString in class Object
Returns:
the name
See Also:
Object.toString()

Release 0.4.0 (2011-09-20_1324)