package testApplication; import logging.LogElement; import visualizationElements.Graph; /** * This class provides an example for using logging.LogElement. * The super class has been extended by member value and corresponding get method. * The standard constructor has been overwritten and a new one has been introduced. * @see LogElement * @author MSch�fer * DHBW Stuttgart/Campus Horb AI2008
*
*/ public class TestLogElement extends LogElement{ /** The log elements sum up value. */ protected long value; private visualizationElements.Graph g; // Zusätzliches Element graph zur Protokollierung der aktuellen Zustände public visualizationElements.Graph getGraph(){ return this.g; } /** * Standard constructor. * Calls the constructor of super class and sets value 0. */ public TestLogElement() { super(); value=0; } /** * Extended constructor. * Sets specified step number, description and sum up value. * @param step the log element's step number * @param description the log element's step description * @param value the log element's sum up value */ public TestLogElement(int step,String description,long value, Graph graph){ this.step=step; this.description=description; this.value=value; this.g = graph; } /** * Returns the log element's sum up value. * @return the log element's sum up value */ public long getValue(){ return value; } }