2024-07-02 19:13:30 +00:00
|
|
|
|
package OurApplication;
|
2024-06-15 19:55:30 +00:00
|
|
|
|
|
2024-07-02 19:13:30 +00:00
|
|
|
|
import graph.DirectedGraph;
|
|
|
|
|
import graph.EdgeMarking;
|
|
|
|
|
import graph.VertexMarking;
|
2024-06-15 19:55:30 +00:00
|
|
|
|
import logging.LogElement;
|
2024-07-03 17:41:46 +00:00
|
|
|
|
import visualizationElements.Edge;
|
|
|
|
|
import visualizationElements.Vertex;
|
2024-06-15 19:55:30 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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.
|
2024-07-02 19:13:30 +00:00
|
|
|
|
* @see LogElement
|
|
|
|
|
* @author MSch<EFBFBD>fer
|
2024-06-15 19:55:30 +00:00
|
|
|
|
* DHBW Stuttgart/Campus Horb AI2008<br>
|
|
|
|
|
* <br>
|
|
|
|
|
*/
|
2024-07-02 19:13:30 +00:00
|
|
|
|
public class OurLogElement extends LogElement{
|
2024-06-15 19:55:30 +00:00
|
|
|
|
|
|
|
|
|
/** The log elements sum up value. */
|
|
|
|
|
protected long value;
|
2024-07-03 17:41:46 +00:00
|
|
|
|
protected Vertex vertex;
|
|
|
|
|
protected Edge edge;
|
2024-06-15 19:55:30 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Standard constructor.
|
|
|
|
|
* Calls the constructor of super class and sets value 0.
|
|
|
|
|
*/
|
2024-07-02 19:13:30 +00:00
|
|
|
|
public OurLogElement() {
|
2024-06-15 19:55:30 +00:00
|
|
|
|
super();
|
2024-07-03 17:41:46 +00:00
|
|
|
|
this.value = 0;
|
2024-06-15 19:55:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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
|
|
|
|
|
*/
|
2024-07-03 17:41:46 +00:00
|
|
|
|
public OurLogElement(int step, String description, long value, Vertex v){
|
2024-07-02 22:46:21 +00:00
|
|
|
|
this.step = step;
|
|
|
|
|
this.description = description;
|
|
|
|
|
this.value = value;
|
2024-07-03 17:41:46 +00:00
|
|
|
|
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;
|
2024-06-15 19:55:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the log element's sum up value.
|
|
|
|
|
* @return the log element's sum up value
|
|
|
|
|
*/
|
|
|
|
|
public long getValue(){
|
2024-07-03 17:41:46 +00:00
|
|
|
|
return this.value;
|
2024-06-15 19:55:30 +00:00
|
|
|
|
}
|
2024-07-02 22:46:21 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-03 17:41:46 +00:00
|
|
|
|
public Edge getEdge() {
|
|
|
|
|
return this.edge;
|
2024-07-02 19:13:30 +00:00
|
|
|
|
}
|
2024-06-15 19:55:30 +00:00
|
|
|
|
|
2024-07-03 17:41:46 +00:00
|
|
|
|
|
|
|
|
|
public Vertex getVertex() {
|
|
|
|
|
return this.vertex;
|
|
|
|
|
}
|
2024-06-15 19:55:30 +00:00
|
|
|
|
}
|