1 19 20 22 package edu.umd.cs.findbugs.graph; 23 24 import java.util.Iterator ; 25 26 30 public interface Graph 31 < 32 EdgeType extends GraphEdge<EdgeType, VertexType>, 33 VertexType extends GraphVertex<VertexType> 34 > { 35 36 39 public int getNumEdges(); 40 41 44 public int getNumVertices(); 45 46 49 public Iterator <EdgeType> edgeIterator(); 50 51 54 public Iterator <VertexType> vertexIterator(); 55 56 62 public void addVertex(VertexType v); 63 64 70 public boolean containsVertex(VertexType v); 71 72 80 public EdgeType createEdge(VertexType source, VertexType target); 81 82 91 public EdgeType lookupEdge(VertexType source, VertexType target); 92 93 98 public int getNumVertexLabels(); 99 100 104 public void setNumVertexLabels(int numLabels); 105 106 109 public int getNumEdgeLabels(); 110 111 114 public void setNumEdgeLabels(int numLabels); 115 116 119 public void removeEdge(EdgeType e); 120 121 126 public void removeVertex(VertexType v); 127 128 134 public Iterator <EdgeType> outgoingEdgeIterator(VertexType source); 135 136 142 public Iterator <EdgeType> incomingEdgeIterator(VertexType target); 143 144 150 public int getNumIncomingEdges(VertexType vertex); 151 152 158 public int getNumOutgoingEdges(VertexType vertex); 159 160 167 public Iterator <VertexType> successorIterator(VertexType source); 168 169 176 public Iterator <VertexType> predecessorIterator(VertexType target); 177 178 } 179 180 | Popular Tags |