Package com.globalmentor.collections
Interface SuffixTrees.Visitor<N extends SuffixTree.Node,E extends SuffixTree.Edge>
-
- Type Parameters:
N
- The type of node.E
- The type of edge.
- All Known Implementing Classes:
CharSequenceSuffixTrees.AbstractCharSequenceVisitor
- Enclosing class:
- SuffixTrees
public static interface SuffixTrees.Visitor<N extends SuffixTree.Node,E extends SuffixTree.Edge>
A general visitor strategy for visiting nodes. This can be used to implement a pure visitor pattern, in which the destination is aware of and accepts the visitor, or a strategy visitor pattern in which a third object does the traversal.- Author:
- Garret Wilson
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
visit(SuffixTree suffixTree, N node, E parentEdge, int length)
Visits the given node.
-
-
-
Method Detail
-
visit
boolean visit(SuffixTree suffixTree, N node, E parentEdge, int length)
Visits the given node.- Parameters:
suffixTree
- The suffix tree being visited.node
- The node being visited.parentEdge
- The parent edge of the node being visited, ornull
if the node has no parent.length
- The length of elements up to the visited node, including the length of the parent edge.- Returns:
true
if visiting should continue to other nodes.
-
-