Package com.yahoo.prelude.query
Class ToolBox.QueryVisitor
- java.lang.Object
-
- com.yahoo.prelude.query.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 toToolBox.visit(QueryVisitor, Item)
.
-
-
-
Method Detail
-
visit
public abstract boolean visit(Item item)
Called for each item in the query tree given toToolBox.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.
-
-