
de.uni.freiburg.iig.telematik.jagal.graph.exception.EdgeNotFoundException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JAGAL Show documentation
Show all versions of JAGAL Show documentation
JAGAL provides implementations for directed graphs (weighted and unweighted) and various types of transition systems as well as utils for graph traversal and modification.
The newest version!
package de.uni.freiburg.iig.telematik.jagal.graph.exception;
import de.uni.freiburg.iig.telematik.jagal.graph.Edge;
import de.uni.freiburg.iig.telematik.jagal.graph.Vertex;
import de.uni.freiburg.iig.telematik.jagal.graph.abstr.AbstractGraph;
public class EdgeNotFoundException extends GraphException {
private static final long serialVersionUID = -817667248805564124L;
private static final String toStringFormat = "%s does not contain edge (%s -> %s)";
private String sourceName = null;
private String targetName = null;
public , E extends Edge, U> EdgeNotFoundException(E edge, AbstractGraph graph){
super(graph.getName());
this.sourceName = edge.getSource().getName();
this.targetName = edge.getTarget().getName();
}
public , E extends Edge, U> EdgeNotFoundException(String sourceName, String targetName, AbstractGraph graph){
super(graph.getName());
this.sourceName = sourceName;
this.targetName = targetName;
}
@Override
public String getMessage(){
return String.format(toStringFormat, getGraphName(), getSourceName(), getTargetName());
}
public String getSourceName() {
return sourceName;
}
public String getTargetName() {
return targetName;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy