
de.uni.freiburg.iig.telematik.jagal.graph.Graph Maven / Gradle / Ivy
package de.uni.freiburg.iig.telematik.jagal.graph;
import java.util.Collection;
import de.invation.code.toval.validate.ParameterException;
import de.uni.freiburg.iig.telematik.jagal.graph.abstr.AbstractGraph;
public class Graph extends AbstractGraph, Edge>, T> {
public Graph(){
super();
}
public Graph(String name) throws ParameterException{
super(name);
}
public Graph(Collection vertexNames) throws ParameterException{
super(vertexNames);
}
public Graph(String name, Collection vertexNames) throws ParameterException{
super(name, vertexNames);
}
@Override
protected Vertex createNewVertex(String name, T element) {
return new Vertex(name, element);
}
@Override
protected Edge> createNewEdge(Vertex sourceVertex, Vertex targetVertex) {
return new Edge>(sourceVertex, targetVertex);
}
public static void main(String[] args) throws Exception {
Graph g = new Graph();
g.addVertex("v1");
g.addVertex("v2");
g.addEdge("v1", "v2");
System.out.println(g);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy