org.camunda.bpm.engine.impl.tree
Class TreeWalker<T>

java.lang.Object
  extended by org.camunda.bpm.engine.impl.tree.TreeWalker<T>
Direct Known Subclasses:
ActivityExecutionHierarchyWalker, ExecutionWalker, FlowScopeWalker

public abstract class TreeWalker<T>
extends Object

Abstract class that walks through a tree hierarchy. The subclass define the type of tree and provide the concrete walking behavior.

Author:
Thorben Lindhauer

Nested Class Summary
static class TreeWalker.NullCondition<S>
           
static interface TreeWalker.WalkCondition<S>
           
 
Field Summary
protected  T currentElement
           
protected  List<TreeVisitor<T>> postVisitor
           
protected  List<TreeVisitor<T>> preVisitor
           
 
Constructor Summary
TreeWalker(T initialElement)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentElement

protected T currentElement

preVisitor

protected List<TreeVisitor<T>> preVisitor

postVisitor

protected List<TreeVisitor<T>> postVisitor
Constructor Detail

TreeWalker

public TreeWalker(T initialElement)
Method Detail

nextElement

protected abstract T nextElement()

addPreVisitor

public TreeWalker<T> addPreVisitor(TreeVisitor<T> collector)

addPostVisitor

public TreeWalker<T> addPostVisitor(TreeVisitor<T> collector)

walkWhile

public void walkWhile()

walkUntil

public void walkUntil()

walkWhile

public T walkWhile(TreeWalker.WalkCondition<T> condition)

walkUntil

public T walkUntil(TreeWalker.WalkCondition<T> condition)

getCurrentElement

public T getCurrentElement()


Copyright © 2016 camunda services GmbH. All rights reserved.