package logging; import visualisation.HybridWindow; import visualisation.ParameterArea; /** * This class provides the basic algorithm. * Use it in assoziation with packages logging and visualization. * Extend it by the members you need and overwrite LogElementListrun() which contains the specific algorithmic procedures. * Therein you should fill a LogElementList and return it. * Parameters for algorithm processing are read from member parameterArea that ist part of the user interface. * @see logging.LogElement * @see logging.LogElementList * @see HybridWindow * @see ParameterArea * @author Bj�rn Strobel
* University of Cooperative Education Stuttgart, * Campus Horb
* Department of Information Technology
* it2003
*/ public abstract class Algorithm { /**Algorithm title.*/ protected String title; /**Algorithm parameter area from which the algorithm gets its parameters.*/ protected PARAM parameterArea; /**Standard constructor.*/ public Algorithm() { super(); // TODO Auto-generated constructor stub } /**Creates algorithm with specified title and parameter area.*/ public Algorithm(PARAM parameterArea,String title){ this.parameterArea=parameterArea; this.title=title; } /** * Runs the algorithm with parameters specified in parameterArea. * Returns the LogElementList produced by the algorithm processing. * To use this class you will have to overwrite this method. * @return a LogElementList containing the algorithm processings single steps */ public abstract LogElementListrun(); //return new LogElementList() /** * Returns the algorithm title. * @return the algorithm title. */ public String getTitle(){ return title; } /** * Sets the algorithm's title. * @param title the algorithm's title */ public void setTitle(String title){ this.title=title; } /** * Sets the algorithm's parameter area. * @param parameterArea the algorithm's parameter area */ public void setParameterArea(PARAM parameterArea){ this.parameterArea=parameterArea; } /** * Returns the algorithm's parameter area. * @return the algorithm's parameter area */ public PARAM getParameterArea(){ return parameterArea; } }