Package elki.utilities.optionhandling
Class OptionID
- java.lang.Object
-
- elki.utilities.optionhandling.OptionID
-
public final class OptionID extends java.lang.ObjectAn 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.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringdescriptionThe description of the OptionID.private java.lang.StringnameOption name
-
Constructor Summary
Constructors Constructor Description OptionID(java.lang.String name, java.lang.String description)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()Returns the description of this OptionID.java.lang.StringgetName()Get the option name.static OptionIDgetOrCreateOptionID(java.lang.String name, java.lang.String description)Gets or creates the OptionID for the given class and given name.java.lang.StringtoString()Returns the name of this OptionID.
-
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Returns the description of this OptionID.- Returns:
- the description of this OptionID
-
getOrCreateOptionID
public static final OptionID getOrCreateOptionID(java.lang.String name, java.lang.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 parameterepsilonfor the classDBSCANwill be nameddbscan.epsilon.- Parameters:
name- the namedescription- the description is also set if the named OptionID does exist already- Returns:
- the OptionID for the given name
-
toString
public java.lang.String toString()
Returns the name of this OptionID.- Overrides:
toStringin classjava.lang.Object- Returns:
- the name
- See Also:
Object.toString()
-
getName
public java.lang.String getName()
Get the option name.- Returns:
- Option name
-
-