jetbrains.buildServer.util.graph
Class DAGIterator<T>

java.lang.Object
  extended by jetbrains.buildServer.util.graph.DAGIterator<T>
All Implemented Interfaces:
java.lang.Iterable<T>, java.util.Iterator<T>

public abstract class DAGIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>, java.lang.Iterable<T>

Iterator for directed acyclic graph

Author:
dmitry.neverov

Constructor Summary
DAGIterator()
           
 
Method Summary
 java.util.Iterator<T> iterator()
           
abstract  void markStart(java.util.Collection<T> nodes)
          Mark nodes from which to start an iteration
abstract  void markStart(T node)
          Mark node from which to start an iteration
abstract  void markUninteresting(java.util.Collection<T> nodes)
           
abstract  void markUninteresting(T node)
          Mark node itself and nodes reachable from him as uninteresting.
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
hasNext, next
 

Constructor Detail

DAGIterator

public DAGIterator()
Method Detail

markStart

public abstract void markStart(@NotNull
                               T node)
Mark node from which to start an iteration

Parameters:
node - node of interest

markStart

public abstract void markStart(@NotNull
                               java.util.Collection<T> nodes)
Mark nodes from which to start an iteration

Parameters:
nodes - nodes of interest

markUninteresting

public abstract void markUninteresting(@NotNull
                                       T node)
Mark node itself and nodes reachable from him as uninteresting. These nodes will not be included in iteration result.

Parameters:
node - node to mark as uninteresting

markUninteresting

public abstract void markUninteresting(@NotNull
                                       java.util.Collection<T> nodes)

remove

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

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T>