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
     
  • Method Summary

    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 after state is fully traversed.
    boolean
    pre(int state)
    Invoked before state is descended into.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VisitorAdapter

      public VisitorAdapter()
  • Method Details

    • pre

      public boolean pre(int state)
      Description copied from interface: SuffixTree.IVisitor
      Invoked before state is descended into.
      Specified by:
      pre in interface SuffixTree.IVisitor
      Returns:
      Returning false omits the subtree of state. 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 after state is fully traversed.
      Specified by:
      post in interface SuffixTree.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 interface SuffixTree.IVisitor
      Returns:
      Returning false skips the traversal of toState.