Interface RadixTreeImpl.Visitor<T,​R>

  • Type Parameters:
    T - The content type
    R - The result type
    All Known Implementing Classes:
    RadixTreeImpl.VisitorImpl
    Enclosing class:
    RadixTreeImpl<T>

    public static interface RadixTreeImpl.Visitor<T,​R>
    The visitor interface that is used by RadixTreeImpl for performing a task on a searched node.
    Author:
    Tahseen Ur Rehman (tahseen.ur.rehman {at.spam.me.not} gmail.com), Javid Jamae, Dennis Heidsiek, stm
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      R getResult()
      The visitor can store any type of result object, depending on the context of what it is being used for.
      boolean isReady()  
      void visit​(java.lang.String key, int alreadyMatched, java.lang.StringBuffer postfix, magellan.library.utils.RadixTreeImpl.RadixTreeNode<T> parent, magellan.library.utils.RadixTreeImpl.RadixTreeNode<T> node)
      This method gets called by visit when it finds a node matching the key given to it.
    • Method Detail

      • visit

        void visit​(java.lang.String key,
                   int alreadyMatched,
                   java.lang.StringBuffer postfix,
                   magellan.library.utils.RadixTreeImpl.RadixTreeNode<T> parent,
                   magellan.library.utils.RadixTreeImpl.RadixTreeNode<T> node)
        This method gets called by visit when it finds a node matching the key given to it.
        Parameters:
        key - The key that matched the node
        parent - The parent of the node being visited
        node - The node that is being visited
      • isReady

        boolean isReady()
      • getResult

        R getResult()
        The visitor can store any type of result object, depending on the context of what it is being used for.
        Returns:
        The result captured by the visitor.