Top Inners Fields Constructors Methods
org.glassfish.pfl.basic.algorithm

public Class Graph<E>

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collection, .Collections, .HashSet, .List, .Set, org.glassfish.pfl.basic.func.UnaryFunction

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
Graph.Finder<E>

References Deprecated UnaryFunction is deprecated or references (maybe indirectly) at least one deprecated element.
A Finder finds the immediate successors of an element of the graph.

Field Summary

Modifier and TypeField and Description
private List<E>
private List<E>
private Set<E>

Constructor Summary

AccessConstructor and Description
public
Graph(final Collection<E> roots, final Graph.Finder<E> finder)
References Deprecated Graph.Finder is deprecated or references (maybe indirectly) at least one deprecated element.

public
Graph(final E root, final Graph.Finder<E> finder)
References Deprecated Graph.Finder is deprecated or references (maybe indirectly) at least one deprecated element.

Method Summary

Modifier and TypeMethod and Description
public List<E>
public List<E>
public Set<E>
private void
init(final Collection<E> roots, final Graph.Finder<E> finder)
References Deprecated Graph.Finder is deprecated or references (maybe indirectly) at least one deprecated element.

private void
traverse(final E node, final Set<E> visited, final Graph.Finder<E> finder)
References Deprecated Graph.Finder is deprecated or references (maybe indirectly) at least one deprecated element.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

postorderTraversalback to summary
private List<E> postorderTraversal
preorderTraversalback to summary
private List<E> preorderTraversal
rootsback to summary
private Set<E> roots

Constructor Detail

Graphback to summary
public Graph(final Collection<E> roots, final Graph.Finder<E> finder)

References Deprecated

Graph.Finder is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Graphback to summary
public Graph(final E root, final Graph.Finder<E> finder)

References Deprecated

Graph.Finder is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Method Detail

getPostorderListback to summary
public List<E> getPostorderList()
getPreorderListback to summary
public List<E> getPreorderList()
getRootsback to summary
public Set<E> getRoots()
initback to summary
private void init(final Collection<E> roots, final Graph.Finder<E> finder)

References Deprecated

Graph.Finder is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

traverseback to summary
private void traverse(final E node, final Set<E> visited, final Graph.Finder<E> finder)

References Deprecated

Graph.Finder is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

org.glassfish.pfl.basic.algorithm back to summary

public Interface Graph.Finder<E>

extends UnaryFunction<E, List<E>>

References Deprecated

UnaryFunction is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

A Finder finds the immediate successors of an element of the graph.

Method Summary

Inherited from org.glassfish.pfl.basic.func.UnaryFunction:
applyevaluate