ProjektGraph/graph/EdgeMarking.java
2024-07-07 23:07:56 +02:00

46 lines
1015 B
Java

package graph;
/**
* Abstract class representing an edge marking.
* Extends the Marking class.
*/
public abstract class EdgeMarking extends Marking {
}
/**
* 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;
/**
* Constructor to initialize the EdgeWeightMarking with a specified weight.
*
* @param weight The weight value to set.
*/
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;
}
}