Class ToolBox.QueryVisitor

  • Enclosing class:
    ToolBox

    public abstract static class ToolBox.QueryVisitor
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryVisitor()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract void onExit()
      Invoked when all sub-items have been visited, or immediately after visit() if there are no sub-items or visit() returned false.
      abstract boolean visit​(Item item)
      Called for each item in the query tree given to ToolBox.visit(QueryVisitor, Item).
      • Methods inherited from class java.lang.Object

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

      • QueryVisitor

        public QueryVisitor()
    • Method Detail

      • visit

        public abstract boolean visit​(Item item)
        Called for each item in the query tree given to ToolBox.visit(QueryVisitor, Item). Return true to visit the sub-items of the given item, return false to ignore the sub-items.
        Parameters:
        item - each item in the query tree
        Returns:
        whether or not to visit the sub-items of the argument item (and then invoke the onExit() method)
      • onExit

        public abstract void onExit()
        Invoked when all sub-items have been visited, or immediately after visit() if there are no sub-items or visit() returned false.