1 19 20 package edu.umd.cs.findbugs.graph; 21 22 import java.util.Iterator ; 23 24 31 public class DepthFirstSearch 32 < 33 GraphType extends Graph<EdgeType, VertexType>, 34 EdgeType extends GraphEdge<EdgeType, VertexType>, 35 VertexType extends GraphVertex<VertexType> 36 > 37 extends AbstractDepthFirstSearch<GraphType, EdgeType, VertexType> { 38 39 44 public DepthFirstSearch(GraphType graph) { 45 super(graph); 46 } 47 48 @Override 49 protected Iterator <EdgeType> outgoingEdgeIterator(GraphType graph, VertexType vertex) { 50 return graph.outgoingEdgeIterator(vertex); 51 } 52 53 @Override 54 protected VertexType getTarget(EdgeType edge) { 55 return edge.getTarget(); 56 } 57 58 @Override 59 protected VertexType getSource(EdgeType edge) { 60 return edge.getSource(); 61 } 62 63 } 64 65 | Popular Tags |