Package weka.core

Class MOAUtils


  • public class MOAUtils
    extends Object
    A helper class for MOA related classes.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • MOAUtils

        public MOAUtils()
    • Method Detail

      • fromCommandLine

        public static MOAObject fromCommandLine​(ClassOption option,
                                                String commandline)
        Turns a commandline into an object (classname + optional options).
        Parameters:
        option - the corresponding class option
        commandline - the commandline to turn into an object
        Returns:
        the generated oblect
      • fromCommandLine

        public static MOAObject fromCommandLine​(Class requiredType,
                                                String commandline)
        Turns a commandline into an object (classname + optional options).
        Parameters:
        requiredType - the required class
        commandline - the commandline to turn into an object
        Returns:
        the generated oblect
      • fromOption

        public static MOAObject fromOption​(ClassOption option)
        Creates a MOA object from the specified class option.
        Parameters:
        option - the option to build the object from
        Returns:
        the created object
      • toCommandLine

        public static String toCommandLine​(MOAObject obj)
        Returs the commandline for the given object. If the object is not derived from AbstractOptionHandler, then only the classname. Otherwise the classname and the options are returned.
        Parameters:
        obj - the object to generate the commandline for
        Returns:
        the commandline