ProjektGraph/graph/EdgeMarking.java

46 lines
1015 B
Java
Raw Normal View History

2024-06-15 14:48:28 +00:00
package graph;
2024-07-07 21:07:56 +00:00
/**
* Abstract class representing an edge marking.
* Extends the Marking class.
*/
public abstract class EdgeMarking extends Marking {
2024-06-15 14:48:28 +00:00
}
2024-07-07 21:07:56 +00:00
/**
* Class representing a specific type of edge marking: edge weight.
* Inherits from EdgeMarking.
*/
class EdgeWeightMarking extends EdgeMarking {
/** The weight value associated with this edge marking. */
private int weight;
2024-07-07 21:07:56 +00:00
/**
* Constructor to initialize the EdgeWeightMarking with a specified weight.
*
* @param weight The weight value to set.
*/
EdgeWeightMarking(int weight) {
this.weight = weight;
}
2024-07-07 21:07:56 +00:00
/**
* Sets the weight value of this edge marking.
*
* @param weight The weight value to set.
*/
public void setWeight(int weight) {
this.weight = weight;
}
2024-07-07 21:07:56 +00:00
/**
* Retrieves the weight value of this edge marking.
*
* @return The weight value of this edge marking.
*/
public int getWeight() {
return this.weight;
}
}