org.apache.cayenne.ashwood.graph
Class DepthFirstSearch<E>

java.lang.Object
  extended by org.apache.cayenne.ashwood.graph.DepthFirstSearch<E>
All Implemented Interfaces:
java.util.Iterator<E>
Direct Known Subclasses:
DepthFirstStampSearch

public class DepthFirstSearch<E>
extends java.lang.Object
implements java.util.Iterator<E>

Since:
3.1

Field Summary
protected  DigraphIteration<E,?> factory
           
protected  E firstVertex
           
protected  java.util.Set<E> seen
           
protected  org.apache.commons.collections.ArrayStack stack
           
 
Constructor Summary
DepthFirstSearch(DigraphIteration<E,?> factory, E firstVertex)
           
 
Method Summary
 boolean hasNext()
           
 E next()
           
 void remove()
           
 void reset(E newFirstVertex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected DigraphIteration<E,?> factory

firstVertex

protected E firstVertex

stack

protected org.apache.commons.collections.ArrayStack stack

seen

protected java.util.Set<E> seen
Constructor Detail

DepthFirstSearch

public DepthFirstSearch(DigraphIteration<E,?> factory,
                        E firstVertex)
Method Detail

reset

public void reset(E newFirstVertex)

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<E>

next

public E next()
Specified by:
next in interface java.util.Iterator<E>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<E>


Copyright © 2001-2012 Apache Cayenne. All Rights Reserved.