Package 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 Object
implements SearchTreeCallback<VertexType>
A search tree callback implementation that builds a list of SearchTrees
recording a graph search.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LinkedList
<SearchTree<VertexType>> private final HashMap
<VertexType, SearchTree<VertexType>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToSearchTree
(VertexType parent, VertexType child) Add an edge to the current search tree.private SearchTree
<VertexType> createSearchTree
(VertexType vertex) Get an Iterator over the recorded SearchTrees.void
startSearchTree
(VertexType vertex) Start a search tree.
-
Field Details
-
searchTreeMap
private final HashMap<VertexType extends GraphVertex<VertexType>,SearchTree<VertexType extends GraphVertex<VertexType>>> searchTreeMap -
searchTreeList
-
-
Constructor Details
-
SearchTreeBuilder
public SearchTreeBuilder()
-
-
Method Details
-
startSearchTree
Description copied from interface:SearchTreeCallback
Start a search tree.- Specified by:
startSearchTree
in interfaceSearchTreeCallback<VertexType extends GraphVertex<VertexType>>
- Parameters:
vertex
- the root of the search tree
-
addToSearchTree
Description copied from interface:SearchTreeCallback
Add an edge to the current search tree.- Specified by:
addToSearchTree
in interfaceSearchTreeCallback<VertexType extends GraphVertex<VertexType>>
- Parameters:
parent
- the parent vertexchild
- the child vertex
-
searchTreeIterator
Get an Iterator over the recorded SearchTrees. -
createSearchTree
-