package edu.cmu.cs211.graph; import java.util.Collection; import java.util.Set; /** * A base to help implement a directed graph */ public class GeneralGraph> implements Graph { /** * Creates an empty graph. */ public GeneralGraph() { } /** * Creates a graph with pre-defined vertices. * * @param vertices * A list of the vertices in the graph. * @throws NullPointerException * If vertices is null, or contains null items */ public GeneralGraph (Collection vertices) { } /** * Creates a graph with pre-defined edges and vertices. * * @param vertices * A list of the vertices in the graph. * @param edges * A list of edges for the graph. * @throws IllegalArgumentException if edges contains invalid edges. * @throws NullPointerException * If vertices or edges is null, or either contain null items */ public GeneralGraph (Collection vertices, Collection edges) { } /** * Copy Constructor * * @param g * A graph to copy * @throws IllegalArgumentException if g violates Graph invariants by * returning illegal edges in its outgoingEdge methods * @throws NullPointerException * If g is null, or g's methods violates Graph invariants * by returning null items in verticies or outgoingEdges */ public GeneralGraph (Graph g) { } public boolean addVertex(V vertex) { } public boolean addVertices(Collection vertices) { } public boolean addEdge (E e) { } public boolean addEdges (Collection edges) { } public boolean removeEdge (V src, V dest) { } public void clearEdges () { } public Set vertices () { } public E connected (V i, V j) { } public Set neighbors (V vertex) { } public Collection outgoingEdges (V vertex) { } }