Package org.camunda.bpm.engine.impl.tree
Class ReferenceWalker<T>
- java.lang.Object
- 
- org.camunda.bpm.engine.impl.tree.ReferenceWalker<T>
 
- 
- Direct Known Subclasses:
- ActivityInstanceWalker,- CompensationEventSubscriptionWalker,- ExecutionTopDownWalker,- MigratingProcessElementInstanceTopDownWalker,- 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
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classReferenceWalker.NullCondition<S>static interfaceReferenceWalker.WalkCondition<S>
 - 
Field SummaryFields Modifier and Type Field Description protected List<T>currentElementsprotected List<TreeVisitor<T>>postVisitorprotected List<TreeVisitor<T>>preVisitor
 - 
Constructor SummaryConstructors Constructor Description ReferenceWalker(List<T> initialElements)ReferenceWalker(T initialElement)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ReferenceWalker<T>addPostVisitor(TreeVisitor<T> collector)ReferenceWalker<T>addPreVisitor(TreeVisitor<T> collector)TgetCurrentElement()protected abstract Collection<T>nextElements()TwalkUntil()TwalkUntil(ReferenceWalker.WalkCondition<T> condition)TwalkWhile()TwalkWhile(ReferenceWalker.WalkCondition<T> condition)
 
- 
- 
- 
Field Detail- 
preVisitorprotected List<TreeVisitor<T>> preVisitor 
 - 
postVisitorprotected List<TreeVisitor<T>> postVisitor 
 
- 
 - 
Method Detail- 
nextElementsprotected abstract Collection<T> nextElements() 
 - 
addPreVisitorpublic ReferenceWalker<T> addPreVisitor(TreeVisitor<T> collector) 
 - 
addPostVisitorpublic ReferenceWalker<T> addPostVisitor(TreeVisitor<T> collector) 
 - 
walkWhilepublic T walkWhile() 
 - 
walkUntilpublic T walkUntil() 
 - 
walkWhilepublic T walkWhile(ReferenceWalker.WalkCondition<T> condition) 
 - 
walkUntilpublic T walkUntil(ReferenceWalker.WalkCondition<T> condition) 
 - 
getCurrentElementpublic T getCurrentElement() 
 
- 
 
-