public abstract class TreeWalker<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TreeWalker.NullCondition<S> |
static interface |
TreeWalker.WalkCondition<S> |
Modifier and Type | Field and Description |
---|---|
protected T |
currentElement |
protected List<TreeVisitor<T>> |
postVisitor |
protected List<TreeVisitor<T>> |
preVisitor |
Constructor and Description |
---|
TreeWalker(T initialElement) |
Modifier and Type | Method and Description |
---|---|
TreeWalker<T> |
addPostVisitor(TreeVisitor<T> collector) |
TreeWalker<T> |
addPreVisitor(TreeVisitor<T> collector) |
T |
getCurrentElement() |
protected abstract T |
nextElement() |
void |
walkUntil() |
T |
walkUntil(TreeWalker.WalkCondition<T> condition) |
void |
walkWhile() |
T |
walkWhile(TreeWalker.WalkCondition<T> condition) |
protected T currentElement
protected List<TreeVisitor<T>> preVisitor
protected List<TreeVisitor<T>> postVisitor
public TreeWalker(T initialElement)
protected abstract T nextElement()
public TreeWalker<T> addPreVisitor(TreeVisitor<T> collector)
public TreeWalker<T> addPostVisitor(TreeVisitor<T> collector)
public void walkWhile()
public void walkUntil()
public T walkWhile(TreeWalker.WalkCondition<T> condition)
public T walkUntil(TreeWalker.WalkCondition<T> condition)
public T getCurrentElement()
Copyright © 2018. All rights reserved.