edu.umd.cs.findbugs.graph
Class SearchTree<VertexType extends GraphVertex<VertexType>>

java.lang.Object
  extended by edu.umd.cs.findbugs.graph.SearchTree<VertexType>

public class SearchTree<VertexType extends GraphVertex<VertexType>>
extends java.lang.Object

SearchTree represents a search tree produced by a graph search algorithm, such as BreadthFirstSearch or DepthFirstSearch.


Field Summary
private  java.util.ArrayList<SearchTree<VertexType>> m_childList
           
private  VertexType m_vertex
           
 
Constructor Summary
SearchTree(VertexType v)
          Create a new search tree.
 
Method Summary
 void addChild(SearchTree<VertexType> child)
          Add a child search tree.
 void addVerticesToSet(java.util.Set<VertexType> set)
          Add all vertices contained in this search tree to the given set.
 java.util.Iterator<SearchTree<VertexType>> childIterator()
          Return collection of children of this search tree.
 VertexType getVertex()
          Get the vertex contained in this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_vertex

private VertexType extends GraphVertex<VertexType> m_vertex

m_childList

private java.util.ArrayList<SearchTree<VertexType extends GraphVertex<VertexType>>> m_childList
Constructor Detail

SearchTree

public SearchTree(VertexType v)
Create a new search tree.

Method Detail

getVertex

public VertexType getVertex()
Get the vertex contained in this node.


addChild

public void addChild(SearchTree<VertexType> child)
Add a child search tree.


childIterator

public java.util.Iterator<SearchTree<VertexType>> childIterator()
Return collection of children of this search tree. (Elements returned are also SearchTree objects).


addVerticesToSet

public void addVerticesToSet(java.util.Set<VertexType> set)
Add all vertices contained in this search tree to the given set.