Package weka.core

Interface OptionHandler

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String[] getOptions()
      Gets the current option settings for the OptionHandler.
      java.util.Enumeration<Option> listOptions()
      Returns an enumeration of all the available options..
      static OptionHandler makeCopy​(OptionHandler toCopy)
      Creates an instance of the class that the given option handler belongs to and sets the options for this new instance by taking the option settings from the given option handler.
      void setOptions​(java.lang.String[] options)
      Sets the OptionHandler's options using the given list.
    • Method Detail

      • listOptions

        java.util.Enumeration<Option> listOptions()
        Returns an enumeration of all the available options..
        Returns:
        an enumeration of all available options.
      • setOptions

        void setOptions​(java.lang.String[] options)
                 throws java.lang.Exception
        Sets the OptionHandler's options using the given list. All options will be set (or reset) during this call (i.e. incremental setting of options is not possible).
        Parameters:
        options - the list of options as an array of strings
        Throws:
        java.lang.Exception - if an option is not supported
      • getOptions

        java.lang.String[] getOptions()
        Gets the current option settings for the OptionHandler.
        Returns:
        the list of current option settings as an array of strings
      • makeCopy

        static OptionHandler makeCopy​(OptionHandler toCopy)
                               throws java.lang.Exception
        Creates an instance of the class that the given option handler belongs to and sets the options for this new instance by taking the option settings from the given option handler. If an exception is thrown when this process is performed, the fall back is to take a standard deep copy of the given option handler object. If that also fails, an exception is thrown by this method. A message will be printed to the standard error if the object is deep copied. A stack trace is also output in this case.
        Parameters:
        toCopy - the option handler to copy
        Throws:
        java.lang.Exception - if the object could not be deep copied either