MOA 12.03
Real Time Analytics for Data Streams
moa.options.AbstractClassOption Class Reference

Abstract class option. More...

Inheritance diagram for moa.options.AbstractClassOption:
Collaboration diagram for moa.options.AbstractClassOption:

List of all members.

Public Member Functions

 AbstractClassOption (String name, char cliChar, String purpose, Class<?> requiredType, String defaultCLIString)
 Creates a new instance of an abstract option given its class name, command line interface text, its purpose, its class type and its default command line interface text.
 AbstractClassOption (String name, char cliChar, String purpose, Class<?> requiredType, String defaultCLIString, String nullString)
 Creates a new instance of an abstract option given its class name, command line interface text, its purpose, its class type, default command line interface text, and its null text.
void setCurrentObject (Object obj)
 Sets current object.
Object getPreMaterializedObject ()
 Returns the current object.
Class<?> getRequiredType ()
 Gets the class type of this option.
String getNullString ()
 Gets the null string of this option.
Object materializeObject (TaskMonitor monitor, ObjectRepository repository)
 Gets a materialized object of this option.
String getDefaultCLIString ()
 Gets the Command Line Interface text.
abstract String getValueAsCLIString ()
 Gets the value of a Command Line Interface text as a string.
abstract void setValueViaCLIString (String s)
 Sets value of this option via the Command Line Interface text.
abstract JComponent getEditComponent ()
 Gets the GUI component to edit.

Static Public Member Functions

static String classToCLIString (Class<?> aClass, Class<?> requiredType)
 Gets the command line interface text of the class.
static String stripPackagePrefix (String className, Class<?> expectedType)
 Gets the class name without its package name prefix.

Static Public Attributes

static final String FILE_PREFIX_STRING = "file:"
 The prefix text to use to indicate file.
static final String INMEM_PREFIX_STRING = "inmem:"
 The prefix text to use to indicate inmem.

Protected Attributes

Object currentValue
 The current object.
Class<?> requiredType
 The class type.
String defaultCLIString
 The default command line interface text.
String nullString
 The null text.

Detailed Description

Abstract class option.

Author:
Richard Kirkby (rkirkby@cs.waikato.ac.nz)
Version:
$Revision$

Definition at line 37 of file AbstractClassOption.java.


Constructor & Destructor Documentation

moa.options.AbstractClassOption.AbstractClassOption ( String  name,
char  cliChar,
String  purpose,
Class<?>  requiredType,
String  defaultCLIString 
)

Creates a new instance of an abstract option given its class name, command line interface text, its purpose, its class type and its default command line interface text.

Parameters:
namethe name of this option
cliCharthe command line interface text
purposethe text describing the purpose of this option
requiredTypethe class type
defaultCLIStringthe default command line interface text

Definition at line 70 of file AbstractClassOption.java.

moa.options.AbstractClassOption.AbstractClassOption ( String  name,
char  cliChar,
String  purpose,
Class<?>  requiredType,
String  defaultCLIString,
String  nullString 
)

Creates a new instance of an abstract option given its class name, command line interface text, its purpose, its class type, default command line interface text, and its null text.

Parameters:
namethe name of this option
cliCharthe command line interface text
purposethe text describing the purpose of this option
requiredTypethe class type
defaultCLIStringthe default command line interface text
nullStringthe null text

Definition at line 87 of file AbstractClassOption.java.

Here is the call graph for this function:


Member Function Documentation

static String moa.options.AbstractClassOption.classToCLIString ( Class<?>  aClass,
Class<?>  requiredType 
) [static]

Gets the command line interface text of the class.

Parameters:
aClassthe class
requiredTypethe class type
Returns:
the command line interface text of the class

Definition at line 198 of file AbstractClassOption.java.

Referenced by moa.options.WEKAClassOption.objectToCLIString(), and moa.options.ClassOption.objectToCLIString().

Here is the caller graph for this function:

String moa.options.AbstractClassOption.getDefaultCLIString ( )

Gets the Command Line Interface text.

Returns:
the Command Line Interface text

Implements moa.options.Option.

Definition at line 187 of file AbstractClassOption.java.

abstract JComponent moa.options.AbstractClassOption.getEditComponent ( ) [pure virtual]

Gets the GUI component to edit.

Returns:
the component to edit

Reimplemented from moa.options.AbstractOption.

Implemented in moa.options.ClassOption, and moa.options.WEKAClassOption.

String moa.options.AbstractClassOption.getNullString ( )

Gets the null string of this option.

Returns:
the null string of this option

Definition at line 136 of file AbstractClassOption.java.

Referenced by moa.gui.ClassOptionEditComponent.editObject().

Here is the caller graph for this function:

Object moa.options.AbstractClassOption.getPreMaterializedObject ( )

Returns the current object.

Returns:
the current object

Definition at line 118 of file AbstractClassOption.java.

Class<?> moa.options.AbstractClassOption.getRequiredType ( )

Gets the class type of this option.

Returns:
the class type of this option

Definition at line 127 of file AbstractClassOption.java.

Referenced by moa.gui.WEKAClassOptionEditComponent.editObject(), moa.gui.ClassOptionEditComponent.editObject(), weka.core.MOAUtils.fromCommandLine(), and weka.core.MOAUtils.fromOption().

Here is the caller graph for this function:

abstract String moa.options.AbstractClassOption.getValueAsCLIString ( ) [pure virtual]

Gets the value of a Command Line Interface text as a string.

Returns:
the string with the value of the Command Line Interface text

Implements moa.options.Option.

Implemented in moa.options.ClassOption, and moa.options.WEKAClassOption.

Object moa.options.AbstractClassOption.materializeObject ( TaskMonitor  monitor,
ObjectRepository  repository 
)

Gets a materialized object of this option.

Parameters:
monitorthe task monitor to use
repositorythe object repository to use
Returns:
the materialized object

Definition at line 147 of file AbstractClassOption.java.

Referenced by moa.options.AbstractOptionHandler.prepareClassOptions().

Here is the call graph for this function:

Here is the caller graph for this function:

void moa.options.AbstractClassOption.setCurrentObject ( Object  obj)

Sets current object.

Parameters:
objthe object to set as current.

Definition at line 101 of file AbstractClassOption.java.

Referenced by moa.tasks.EvaluateModel.EvaluateModel(), moa.tasks.LearnModel.LearnModel(), weka.datagenerators.classifiers.classification.MOA.setOptions(), and weka.classifiers.meta.MOA.setOptions().

Here is the caller graph for this function:

abstract void moa.options.AbstractClassOption.setValueViaCLIString ( String  s) [pure virtual]

Sets value of this option via the Command Line Interface text.

Parameters:
sthe Command Line Interface text

Implements moa.options.Option.

Implemented in moa.options.ClassOption, and moa.options.WEKAClassOption.

static String moa.options.AbstractClassOption.stripPackagePrefix ( String  className,
Class<?>  expectedType 
) [static]

Gets the class name without its package name prefix.

Parameters:
classNamethe name of the class
expectedTypethe type of the class
Returns:
the class name without its package name prefix

Definition at line 231 of file AbstractClassOption.java.

Referenced by moa.options.AbstractOptionHandler.getCLICreationString().

Here is the caller graph for this function:


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations