jcommon.graph
Class ObjectGraph
java.lang.Object
jcommon.graph.DirectedAcyclicGraph<ObjectVertex>
jcommon.graph.ObjectGraph
- All Implemented Interfaces:
- Cloneable, IGraph<ObjectVertex>
public class ObjectGraph
- extends DirectedAcyclicGraph<ObjectVertex>
Factory and implementation of a dependency graph that can topologically sort vertices that are Objects.
- See Also:
DirectedAcyclicGraph
| Methods inherited from class jcommon.graph.DirectedAcyclicGraph |
addVertex, build, copy, create, getEdges, getVertices, removeVertex, sort, sort, sortAsync, sortAsync, sortAsync, sortAsync, sortAsync, sortAsync, sortAsync, sortAsync, validate |
copyAsObjectGraph
public ObjectGraph copyAsObjectGraph()
- See Also:
DirectedAcyclicGraph.copy()
buildFromObjects
public static ObjectGraph buildFromObjects(Object... vertices)
- See Also:
DirectedAcyclicGraph.build(jcommon.graph.IVertex[])
createForObjects
public static ObjectGraph createForObjects()
- See Also:
DirectedAcyclicGraph.create()
addVertex
public ObjectGraph addVertex(Object vertex)
- See Also:
DirectedAcyclicGraph.addVertex(jcommon.graph.IVertex)
removeVertex
public ObjectGraph removeVertex(Object vertex)
- See Also:
DirectedAcyclicGraph.removeVertex(jcommon.graph.IVertex)
addEdge
public ObjectGraph addEdge(ObjectVertex from,
ObjectVertex to)
- Description copied from interface:
IGraph
- Adds a new
IEdge instance to this IGraph.
- Specified by:
addEdge in interface IGraph<ObjectVertex>- Overrides:
addEdge in class DirectedAcyclicGraph<ObjectVertex>
- Parameters:
from - An instance of IVertex of TVertex that begins the edge.to - An instance of IVertex of TVertex that the edge is pointing to.
- Returns:
- The current instance of
IGraph for use in a builder-style pattern. - See Also:
DirectedAcyclicGraph.addEdge(jcommon.graph.IVertex, jcommon.graph.IVertex)
removeEdge
public ObjectGraph removeEdge(ObjectVertex from,
ObjectVertex to)
- Description copied from interface:
IGraph
- Removes an existing edge from this
IGraph.
- Specified by:
removeEdge in interface IGraph<ObjectVertex>- Overrides:
removeEdge in class DirectedAcyclicGraph<ObjectVertex>
- Parameters:
from - An instance of IVertex of TVertex that begins the edge.to - An instance of IVertex of TVertex that the edge is pointing to.
- Returns:
- The current instance of
IGraph for use in a builder-style pattern. - See Also:
DirectedAcyclicGraph.removeEdge(jcommon.graph.IVertex, jcommon.graph.IVertex)
Copyright © 2012-2013. All Rights Reserved.