Package weka.core

Interface OptionHandler

    • Method Detail

      • listOptions

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

        void setOptions​(String[] options)
                 throws 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:
        Exception - if an option is not supported
      • getOptions

        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 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:
        Exception - if the object could not be deep copied either