Class OptionDescriptor

java.lang.Object
chemaxon.marvin.util.OptionDescriptor

@PublicAPI public class OptionDescriptor extends Object
General option descriptor class.
Since:
Marvin 5.0, 06/05/2007
  • Field Details

  • Constructor Details

    • OptionDescriptor

      public OptionDescriptor(String name, String invname, int type, String desc, String[] disable, String[] enable, String[] deselect)
      Creates an option.
      Parameters:
      name - the option name
      invname - the inverse option name if the default state is on, null otherwise
      type - the type
      desc - the description
      disable - array of options to disable
      enable - array of options to enable
      deselect - array of options to deselect
  • Method Details

    • getName

      public String getName()
      Gets the option name.
      Returns:
      the option name
    • getInverseName

      public String getInverseName()
      Gets the inverse option name.
      Returns:
      the option name
    • isDefaultSelected

      public boolean isDefaultSelected()
      Tests whether the option is selected by default. The option is selected by default if there is an inverse option.
      Returns:
      true if the option is selected by default, false otherwise
    • getType

      public int getType()
      Gets the option type.
      Returns:
      the option type
    • getDescription

      public String getDescription()
      Gets the description.
      Returns:
      the description
    • getOptionsToDisable

      public String[] getOptionsToDisable()
      Gets the options that must be switched off if this option is selected.
      Returns:
      array of options to disable
    • getOptionsToEnable

      public String[] getOptionsToEnable()
      Gets the options that must be switched off if this option is selected.
      Returns:
      array of options to disable
    • getOptionsToDeselect

      public String[] getOptionsToDeselect()
      Gets the options that must be deselected if this option is selected.
      Returns:
      array of options to switch off
    • parseType

      public static int parseType(String s)
      Parses an option type from a string.
      Parameters:
      s - the string ("BOOL" or "NONNEGATIVE_REAL")
      Returns:
      the type
    • toString

      public String toString()
      Overrides Object.toString() to ease debugging. Returns a string consisting of the classname (without the package name!), the at-sign character `@', the unsigned hexadecimal representation of the hash code of the object and the option name in square brackets.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the object