import java.util.Collection; public interface Graph { // returns a Collection (e.g. List, but could be anything iterable, such // as a set) of the vertices of the Graph public Collection vertices(); // returns a Collection (e.g. List, but could be anything iterable, such // as a set) of the edges of the Graph public Collection edges(); // returns a Collection (e.g. List, but could be anything iterable, such // as a set) of the vertices incident to v, i.e. w is in it if v->w is // an edge public Collection incidentEdges(Vertex v); // returns true if there is an edge from v to w, false otherwise public boolean isAdjacent(Vertex v, Vertex w); }