ProjektGraph/OurApplication/OurLogElement.java
2024-07-03 19:41:46 +02:00

75 lines
1.7 KiB
Java
Raw Permalink Blame History

package OurApplication;
import graph.DirectedGraph;
import graph.EdgeMarking;
import graph.VertexMarking;
import logging.LogElement;
import visualizationElements.Edge;
import visualizationElements.Vertex;
/**
* 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<63>fer
* DHBW Stuttgart/Campus Horb AI2008<br>
* <br>
*/
public class OurLogElement extends LogElement{
/** The log elements sum up value. */
protected long value;
protected Vertex vertex;
protected Edge edge;
/**
* Standard constructor.
* Calls the constructor of super class and sets value 0.
*/
public OurLogElement() {
super();
this.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 OurLogElement(int step, String description, long value, Vertex v){
this.step = step;
this.description = description;
this.value = value;
this.vertex = v;
}
public OurLogElement(int step, String description, long value, Edge e){
this.step = step;
this.description = description;
this.value = value;
this.edge = e;
}
/**
* Returns the log element's sum up value.
* @return the log element's sum up value
*/
public long getValue(){
return this.value;
}
public Edge getEdge() {
return this.edge;
}
public Vertex getVertex() {
return this.vertex;
}
}