org.camunda.bpm.engine.impl.tree
Class ReferenceWalker<T>
java.lang.Object
org.camunda.bpm.engine.impl.tree.ReferenceWalker<T>
- Direct Known Subclasses:
- ActivityInstanceWalker, SingleReferenceWalker
public abstract class ReferenceWalker<T>
- extends Object
A walker for walking through an object reference structure (e.g. an execution tree).
Any visited element can have any number of following elements. The elements are visited
with a breadth-first approach: The walker maintains a list of next elements to which it adds
a new elements at the end whenever it has visited an element. The walker stops when it encounters
an element that fulfills the given ReferenceWalker.WalkCondition.
Subclasses define the type of objects and provide the walking behavior.
- Author:
- Thorben Lindhauer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currentElements
protected List<T> currentElements
preVisitor
protected List<TreeVisitor<T>> preVisitor
postVisitor
protected List<TreeVisitor<T>> postVisitor
ReferenceWalker
public ReferenceWalker(T initialElement)
nextElements
protected abstract Collection<T> nextElements()
addPreVisitor
public ReferenceWalker<T> addPreVisitor(TreeVisitor<T> collector)
addPostVisitor
public ReferenceWalker<T> addPostVisitor(TreeVisitor<T> collector)
walkWhile
public T walkWhile()
walkUntil
public T walkUntil()
walkWhile
public T walkWhile(ReferenceWalker.WalkCondition<T> condition)
walkUntil
public T walkUntil(ReferenceWalker.WalkCondition<T> condition)
getCurrentElement
public T getCurrentElement()
Copyright © 2016 camunda services GmbH. All rights reserved.