ツリー構造を優先順序でトラバースするためのガイドとして列挙を公開しています (イテレータはこれらの列挙型定数を使用して、ツリーをトラバースする方法を決定します)。
/**
* The result type of an {@link IVisitor} implementation.
*
* @author Johannes Lichtenberger, University of Konstanz
*/
public enum EVisitResult {
/** Continue without visiting the siblings of this node. */
SKIPSIBLINGS,
/** Continue without visiting the descendants of this node. */
SKIPSUBTREE,
/** Continue traversal. */
CONTINUE,
/** Terminate traversal. */
TERMINATE,
/** Pop from the right sibling stack. */
SKIPSUBTREEPOPSTACK
}
ただし、最後の列挙型定数は内部ビジターにのみ使用され、パブリック API を使用するユーザーからは使用しないでください。「SKIPSUBTREEPOPSTACK」を非表示にする方法はありますか?