ProjektGraph/graph/EdgeWeightMarking.java
2024-07-08 00:11:04 +02:00

40 lines
889 B
Java

package graph;
/**
* Class representing a specific type of edge marking: edge weight.
* Inherits from EdgeMarking.
*/
public class EdgeWeightMarking extends EdgeMarking {
/** The weight value associated with this edge marking. */
private int weight;
/**
* Constructor to initialize the EdgeWeightMarking with a specified weight.
*
* @param weight The weight value to set.
*/
public EdgeWeightMarking(int weight) {
this.weight = weight;
}
/**
* Sets the weight value of this edge marking.
*
* @param weight The weight value to set.
*/
public void setWeight(int weight) {
this.weight = weight;
}
/**
* Retrieves the weight value of this edge marking.
*
* @return The weight value of this edge marking.
*/
public int getWeight() {
return this.weight;
}
}