Package weka.core
Class MOAUtils
- java.lang.Object
-
- weka.core.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 Summary
Constructors Constructor Description MOAUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MOAObject
fromCommandLine(Class requiredType, String commandline)
Turns a commandline into an object (classname + optional options).static MOAObject
fromCommandLine(ClassOption option, String commandline)
Turns a commandline into an object (classname + optional options).static MOAObject
fromOption(ClassOption option)
Creates a MOA object from the specified class option.static String
toCommandLine(MOAObject obj)
Returs the commandline for the given object.
-
-
-
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 optioncommandline
- 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 classcommandline
- 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
-
-