proper.engine
Class Engine

java.lang.Object
  extended by proper.core.ProperObject
      extended by proper.engine.Engine
All Implemented Interfaces:
ProperInterface
Direct Known Subclasses:
DatabaseEngine, Milk, MilkClassifier, MilkExperimenter, Weka, WekaClassifier, WekaExperimenter

public abstract class Engine
extends ProperObject

This class provides a simple wrapper for code that needs several arguments. But without the hassle of writing getter and setter methods for every necessary argument.

Version:
$Revision: 1.3 $
Author:
FracPete

Field Summary
 
Fields inherited from interface proper.core.ProperInterface
VERSION
 
Constructor Summary
Engine()
          initializes the object
 
Method Summary
 void clear()
          removes all the stored parameters
 void copyParameter(java.lang.String name, Engine engine)
          copies the given parameter from the other engine
 boolean execute()
          executes the engine and returns TRUE if successful
 boolean exists(java.lang.String name)
          checks whether the given parameter does exist
 java.lang.Object getParameter(java.lang.String name)
          returns the value of the specified parameter; returns NULL if the argument is not yet stored
 java.util.Enumeration getParameters()
          returns an enumeration for the stored parameters
 java.lang.String getStringParameter(java.lang.String name)
          returns the string value of the specified parameter; returns NULL if the argument is not yet stored
 void setParameter(java.lang.String name, java.lang.Object arg)
          sets the specified parameter
 void setParameters(Engine engine)
          sets all the parameters from the given engine and initializes the engine
 java.lang.String toString()
          returns all the parameters in a string representation
 boolean valueEquals(java.lang.String name, java.lang.Object value)
          checks whether the given parameter equals the given value
 
Methods inherited from class proper.core.ProperObject
addListener, addOutput, classInVerbose, debugprint, debugprint, debugprint, debugprint, debugprintln, debugprintln, debugprintln, debugprintln, debugprintln, getListeners, getRuntime, getVerbose, getVerboseLevel, getVerboseLevelForClass, getVerboseString, getVerboseStringForClass, notifyListener, notifyListeners, print, print, print, print, println, println, println, println, println, printMemory, removeListener, setOutput, setVerbose, setVerboseLevel, setVerboseString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Engine

public Engine()
initializes the object

Method Detail

clear

public void clear()
removes all the stored parameters


setParameters

public void setParameters(Engine engine)
sets all the parameters from the given engine and initializes the engine


getParameters

public java.util.Enumeration getParameters()
returns an enumeration for the stored parameters


exists

public boolean exists(java.lang.String name)
checks whether the given parameter does exist


setParameter

public void setParameter(java.lang.String name,
                         java.lang.Object arg)
sets the specified parameter


copyParameter

public void copyParameter(java.lang.String name,
                          Engine engine)
copies the given parameter from the other engine


getParameter

public java.lang.Object getParameter(java.lang.String name)
returns the value of the specified parameter; returns NULL if the argument is not yet stored


getStringParameter

public java.lang.String getStringParameter(java.lang.String name)
returns the string value of the specified parameter; returns NULL if the argument is not yet stored


valueEquals

public boolean valueEquals(java.lang.String name,
                           java.lang.Object value)
checks whether the given parameter equals the given value


execute

public boolean execute()
executes the engine and returns TRUE if successful


toString

public java.lang.String toString()
returns all the parameters in a string representation

Overrides:
toString in class ProperObject