public class DepthFirstSearch extends Object implements ISearchAlgorithm
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
DepthFirstSearch()
Creates a new depth-first algorithm using the maximum search depth for recursing over the nodes.
|
DepthFirstSearch(int searchDepth)
Creates a new depth-first algorithm
|
Modifier and Type | Method and Description |
---|---|
org.apache.commons.collections.set.ListOrderedSet |
search(Object[] nodesFrom,
ISearchCallback callback)
Alternative option to search() that takes an array of nodes as input (instead of a Set)
|
org.apache.commons.collections.set.ListOrderedSet |
search(Set nodesFrom,
ISearchCallback callback)
Search all nodes that originates from a set of nodes.
|
public DepthFirstSearch()
public DepthFirstSearch(int searchDepth)
searchDepth
- The search depth to be used when traversing the nodes recursively. Must be > 0.public org.apache.commons.collections.set.ListOrderedSet search(Object[] nodesFrom, ISearchCallback callback) throws SearchException
SearchException
ISearchAlgorithm
public org.apache.commons.collections.set.ListOrderedSet search(Set nodesFrom, ISearchCallback callback) throws SearchException
ISearchAlgorithm
search
in interface ISearchAlgorithm
nodesFrom
- input nodescallback
- helper callbackSearchException
ISearchAlgorithm
Copyright © 2002–2019. All rights reserved.