edu.umd.cs.findbugs.graph
Class SearchTreeBuilder<VertexType extends GraphVertex<VertexType>>
java.lang.Object
edu.umd.cs.findbugs.graph.SearchTreeBuilder<VertexType>
- All Implemented Interfaces:
- SearchTreeCallback<VertexType>
public class SearchTreeBuilder<VertexType extends GraphVertex<VertexType>>
- extends java.lang.Object
- implements SearchTreeCallback<VertexType>
A search tree callback implementation that builds a
list of SearchTrees recording a graph search.
- Author:
- David Hovemeyer
- See Also:
SearchTreeCallback
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
searchTreeMap
private java.util.HashMap<VertexType extends GraphVertex<VertexType>,SearchTree> searchTreeMap
searchTreeList
private java.util.LinkedList<SearchTree<VertexType extends GraphVertex<VertexType>>> searchTreeList
SearchTreeBuilder
public SearchTreeBuilder()
startSearchTree
public void startSearchTree(VertexType vertex)
- Description copied from interface:
SearchTreeCallback
- Start a search tree.
- Specified by:
startSearchTree
in interface SearchTreeCallback<VertexType extends GraphVertex<VertexType>>
- Parameters:
vertex
- the root of the search tree
addToSearchTree
public void addToSearchTree(VertexType parent,
VertexType child)
- Description copied from interface:
SearchTreeCallback
- Add an edge to the current search tree.
- Specified by:
addToSearchTree
in interface SearchTreeCallback<VertexType extends GraphVertex<VertexType>>
- Parameters:
parent
- the parent vertexchild
- the child vertex
searchTreeIterator
public java.util.Iterator<SearchTree<VertexType>> searchTreeIterator()
- Get an Iterator over the recorded SearchTrees.
createSearchTree
private SearchTree<VertexType> createSearchTree(VertexType vertex)