org.glassfish.pfl.basic.algorithm
Class Graph<E>

java.lang.Object
  extended by org.glassfish.pfl.basic.algorithm.Graph<E>

public class Graph<E>
extends java.lang.Object


Nested Class Summary
static interface Graph.Finder<E>
          A Finder finds the immediate successors of an element of the graph.
 
Constructor Summary
Graph(java.util.Collection<E> roots, Graph.Finder<E> finder)
           
Graph(E root, Graph.Finder<E> finder)
           
 
Method Summary
 java.util.List<E> getPostorderList()
           
 java.util.List<E> getPreorderList()
           
 java.util.Set<E> getRoots()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Graph

public Graph(java.util.Collection<E> roots,
             Graph.Finder<E> finder)

Graph

public Graph(E root,
             Graph.Finder<E> finder)
Method Detail

getRoots

public java.util.Set<E> getRoots()

getPreorderList

public java.util.List<E> getPreorderList()

getPostorderList

public java.util.List<E> getPostorderList()