Package org.carrot2.text.suffixtree
Class SuffixTree.VisitorAdapter
- java.lang.Object
-
- org.carrot2.text.suffixtree.SuffixTree.VisitorAdapter
-
- All Implemented Interfaces:
SuffixTree.IVisitor
- Enclosing class:
- SuffixTree
public static class SuffixTree.VisitorAdapter extends Object implements SuffixTree.IVisitor
Empty implementation recursively walking the entire suffix tree.
-
-
Constructor Summary
Constructors Constructor Description VisitorAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
edge(int fromState, int toState, int startIndex, int endIndex)
Invoked when an edge is visited.void
post(int state)
Invoked afterstate
is fully traversed.boolean
pre(int state)
Invoked beforestate
is descended into.
-
-
-
Method Detail
-
pre
public boolean pre(int state)
Description copied from interface:SuffixTree.IVisitor
Invoked beforestate
is descended into.- Specified by:
pre
in interfaceSuffixTree.IVisitor
- Returns:
- Returning
false
omits the subtree ofstate
.SuffixTree.IVisitor.post(int)
is not invoked for this state if skipped.
-
post
public void post(int state)
Description copied from interface:SuffixTree.IVisitor
Invoked afterstate
is fully traversed.- Specified by:
post
in interfaceSuffixTree.IVisitor
- Parameters:
state
- Identifier of the completed state.
-
edge
public boolean edge(int fromState, int toState, int startIndex, int endIndex)
Description copied from interface:SuffixTree.IVisitor
Invoked when an edge is visited.- Specified by:
edge
in interfaceSuffixTree.IVisitor
- Returns:
- Returning
false
skips the traversal oftoState
.
-
-