|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.uky.rch.ept.xmlSegmentTree.AbstractSegmentTreeVisitor
Abstract class for traversing a segment tree. Contains default
implementations of all the methods of SegmentTreeVisitor except
beginElement() and endElement(). These default
implementations do nothing; preLeft() and
preRight() always return true. getData() always
returns null.
| Constructor Summary | |
AbstractSegmentTreeVisitor()
|
|
| Method Summary | |
abstract void |
beginElement(Element e)
Called for each Element beginning at this node. |
abstract void |
endElement(Element e)
Called for each Element ending at this node. |
void |
enter(Position left,
Position right)
Called as a node of the segment tree is entered. |
void |
finished()
Called just before SegmentTree.traverse() returns. |
Object |
getData()
Retrieve data computed by the traversal. |
void |
postLeft(Position left,
Position mid,
Position right)
Called just after recursing to the left subtree. |
void |
postRight(Position left,
Position mid,
Position right)
Called just after recursing to the right subtree. |
boolean |
preLeft(Position left,
Position mid,
Position right)
Called just before recursing to the left subtree. |
boolean |
preRight(Position left,
Position mid,
Position right)
Called just before recursing to the right subtree. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractSegmentTreeVisitor()
| Method Detail |
public void enter(Position left,
Position right)
throws TraversalException
SegmentTreeVisitor
enter in interface SegmentTreeVisitorleft - the lower bound for this node.right - the upper bound for this node.
TraversalException - to end the traversal
public boolean preLeft(Position left,
Position mid,
Position right)
throws TraversalException
SegmentTreeVisitor
preLeft in interface SegmentTreeVisitorleft - the left bound for this node and the left subtreemid - the right bound for the left subtreeright - the right bound for this node
TraversalException - to end the traversal
public void postLeft(Position left,
Position mid,
Position right)
throws TraversalException
SegmentTreeVisitor
postLeft in interface SegmentTreeVisitorleft - the left bound for this node and the left subtreemid - the right bound for the left subtreeright - the right bound for this node
TraversalException - to end the traversal
public abstract void beginElement(Element e)
throws TraversalException
SegmentTreeVisitorElement beginning at this node. Called first
for tagged elements, in decreasing order of length, then for string
elements, in decreasing order of length.
beginElement in interface SegmentTreeVisitore - the element.
TraversalException - to end the traversal
public abstract void endElement(Element e)
throws TraversalException
SegmentTreeVisitorElement ending at this node. Called first
for string elements, in increasing order of length, then for tagged
elements, in increasing order of length.
endElement in interface SegmentTreeVisitore - the element.
TraversalException - to end the traversal
public boolean preRight(Position left,
Position mid,
Position right)
throws TraversalException
SegmentTreeVisitor
preRight in interface SegmentTreeVisitorleft - the left bound for this nodemid - the left bound for the right subtreeright - the right bound for this node and the right subtree
TraversalException - to end the traversal
public void postRight(Position left,
Position mid,
Position right)
throws TraversalException
SegmentTreeVisitor
postRight in interface SegmentTreeVisitorleft - the left bound for this nodemid - the left bound for the right subtreeright - the right bound for this node and the right subtree
TraversalException - to end the traversal
public void finished()
throws TraversalException
SegmentTreeVisitorSegmentTree.traverse() returns.
finished in interface SegmentTreeVisitorTraversalException - to end the traversalpublic Object getData()
SegmentTreeVisitorSegmentTree.traverse().
getData in interface SegmentTreeVisitornull.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||