Class OptionID


  • public final class OptionID
    extends java.lang.Object
    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.
    Since:
    0.1
    Author:
    Elke Achtert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String description
      The description of the OptionID.
      private java.lang.String name
      Option 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.String getDescription()
      Returns the description of this OptionID.
      java.lang.String getName()
      Get the option name.
      static OptionID getOrCreateOptionID​(java.lang.String name, java.lang.String description)
      Gets or creates the OptionID for the given class and given name.
      java.lang.String toString()
      Returns the name of this OptionID.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        private java.lang.String name
        Option name
      • description

        private java.lang.String description
        The description of the OptionID.
    • Constructor Detail

      • OptionID

        public OptionID​(java.lang.String name,
                        java.lang.String description)
        Constructor.
        Parameters:
        name - the name of the option
        description - the description of the option
    • 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 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
      • toString

        public java.lang.String toString()
        Returns the name of this OptionID.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the name
        See Also:
        Object.toString()
      • getName

        public java.lang.String getName()
        Get the option name.
        Returns:
        Option name