public class CheckOptionHandler extends Check
CheckOptionHandler -W optionHandlerClassName -- test options
Valid options are:
-D Turn on debugging output.
-S Silent mode - prints nothing to stdout.
-W Full name of the OptionHandler analysed. eg: weka.classifiers.rules.ZeroR (default weka.classifiers.rules.ZeroR)
Options specific to option handler weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the consoleOptions after -- are used as user options in testing the OptionHandler
Modifier and Type | Field and Description |
---|---|
protected OptionHandler |
m_OptionHandler
the optionhandler to test
|
protected boolean |
m_Success
whether the tests were successful
|
protected String[] |
m_UserOptions
the user-supplied options
|
Constructor and Description |
---|
CheckOptionHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkCanonicalUserOptions()
checks whether the user-supplied options stay the same after settting,
getting and re-setting again
|
boolean |
checkDefaultOptions()
checks whether the default options can be processed completely
or some invalid options are returned by the getOptions() method.
|
boolean |
checkListOptions()
checks whether the listOptions method works
|
boolean |
checkRemainingOptions()
checks whether the user-supplied options can be processed completely
or some "left-over" options remain
|
boolean |
checkResettingOptions()
checks whether the optionhandler can be re-setted again to default
options after the user-supplied options have been set.
|
boolean |
checkSetOptions()
checks whether the user-supplied options can be processed at all
|
protected void |
compareOptions(String[] options1,
String[] options2)
Compares the two given sets of options.
|
void |
doTests()
Runs some diagnostic tests on an optionhandler object.
|
protected String[] |
getCopy(String[] options)
creates a copy of the given options
|
protected OptionHandler |
getDefaultHandler()
returns a new instance of the OptionHandler's class
|
protected String[] |
getDefaultOptions()
returns the default options the default OptionHandler will return
|
OptionHandler |
getOptionHandler()
Get the OptionHandler used in the tests.
|
String[] |
getOptions()
Gets the current settings of the CheckClassifier.
|
String |
getRevision()
Returns the revision string.
|
boolean |
getSuccess()
returns the success of the tests
|
String[] |
getUserOptions()
Gets the current user-supplied options (creates a copy)
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(String[] args)
Main method for using the CheckOptionHandler.
|
protected String |
printOptions(String[] options)
Prints the given options to a string.
|
void |
setOptionHandler(OptionHandler value)
Set the OptionHandler to work on..
|
void |
setOptions(String[] options)
Parses a given list of options.
|
void |
setUserOptions(String[] value)
Sets the user-supplied options (creates a copy)
|
protected OptionHandler m_OptionHandler
protected String[] m_UserOptions
protected boolean m_Success
public Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class Check
public void setOptions(String[] options) throws Exception
-D Turn on debugging output.
-S Silent mode - prints nothing to stdout.
-W Full name of the OptionHandler analysed. eg: weka.classifiers.rules.ZeroR (default weka.classifiers.rules.ZeroR)
Options specific to option handler weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the console
setOptions
in interface OptionHandler
setOptions
in class Check
options
- the list of options as an array of stringsException
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class Check
public void setOptionHandler(OptionHandler value)
value
- the OptionHandler to use.public OptionHandler getOptionHandler()
public void setUserOptions(String[] value)
value
- the user-supplied options to usepublic String[] getUserOptions()
public boolean getSuccess()
protected String printOptions(String[] options)
options
- the options to be joinedprotected void compareOptions(String[] options1, String[] options2) throws Exception
options1
- the first set of optionsoptions2
- the second set of optionsException
- if the two sets of options differprotected String[] getCopy(String[] options)
options
- the options to copyprotected OptionHandler getDefaultHandler()
protected String[] getDefaultOptions()
public boolean checkListOptions()
public boolean checkSetOptions()
public boolean checkDefaultOptions()
public boolean checkRemainingOptions()
public boolean checkCanonicalUserOptions()
public boolean checkResettingOptions()
public void doTests()
public String getRevision()
public static void main(String[] args)
args
- the options to the CheckOptionHandlerCopyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.