Plexus v0.13.1

com.phoenixst.plexus.traversals
Interface PruningTraverser

All Superinterfaces:
Iterator, Traverser
All Known Implementing Classes:
BreadthFirstTraverser, DepthFirstTraverser, PreOrderTraverser

public interface PruningTraverser
extends Traverser

A Traverser which allows its traversal to be modified by pruning.

Since:
1.0
Version:
$Revision: 1.3 $
Author:
Ray A. Conner

Method Summary
 void prune()
          Signals this Traverser to not explore beyond the last node returned by next().
 
Methods inherited from interface com.phoenixst.plexus.Traverser
getEdge, removeEdge
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

prune

void prune()
Signals this Traverser to not explore beyond the last node returned by next(). This method can be called only once per call to next(). After calling this method (and before calling next() again), remove(), getEdge(), and removeEdge() will all throw IllegalStateExceptions.

Throws:
IllegalStateException - if next() has not yet been called, or remove(), removeEdge, or prune() has been called after the last call to next().
UnsupportedOperationException - if this method is not supported by this Traverser.

Plexus v0.13.1

See the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.