poussecafe.doc.graph.DirectedGraph Maven / Gradle / Ivy
package poussecafe.doc.graph;
import java.util.ArrayList;
import java.util.List;
public class DirectedGraph implements Graph {
private List subGraphs = new ArrayList<>();
private DirectedGraphNodesAndEdges nodesAndEdges = new DirectedGraphNodesAndEdges();
@Override
public List getSubGraphs() {
return new ArrayList<>(subGraphs);
}
public void addSubGraph(DirectedSubGraph subGraph) {
subGraphs.add(subGraph);
}
@Override
public NodesAndEdges getNodesAndEdges() {
return nodesAndEdges;
}
public void setNodesAndEdges(DirectedGraphNodesAndEdges nodesAndEdges) {
this.nodesAndEdges = nodesAndEdges;
}
}