|
|||||||||
| Home >> All >> com >> phoenixst >> [ plexus overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.phoenixst.plexus
Class GraphUtils

java.lang.Objectcom.phoenixst.plexus.GraphUtils
- public class GraphUtils
- extends java.lang.Object
This class contains static final members and static methods related to graphs and their iterators.
- Since:
- 1.0
- Version:
- $Revision: 1.25 $
| Nested Class Summary | |
private static interface |
GraphUtils.SerializableTraverser
|
private static interface |
GraphUtils.SerializableTraverserFactory
|
private static class |
GraphUtils.SingletonEdgeIterator
|
private static class |
GraphUtils.SingletonTraverser
|
private static class |
GraphUtils.SynchronizedGraphWrapper
|
private static class |
GraphUtils.SynchronizedObservableGraphWrapper
|
private static class |
GraphUtils.UnmodifiableGraphWrapper
|
private static class |
GraphUtils.UnmodifiableObservableGraphWrapper
|
| Field Summary | |
static TraverserFactory |
ADJACENT_TRAVERSER_FACTORY
A TraverserFactory which creates adjacent node
traversers. |
static Traverser |
EMPTY_TRAVERSER
An empty Traverser. |
static TraverserFactory |
IN_TRAVERSER_FACTORY
A TraverserFactory which creates in node
traversers for directed graphs. |
static TraverserFactory |
OUT_TRAVERSER_FACTORY
A TraverserFactory which creates out node
traversers for directed graphs. |
| Constructor Summary | |
private |
GraphUtils()
Prevent instantiation. |
| Method Summary | |
static void |
add(Graph destination,
Graph source)
Adds all the nodes and edges from source to
destination. |
static java.util.Iterator |
singletonEdgeIterator(Graph graph,
Graph.Edge edge)
Returns a modifiable, serializable Iterator over
the specified edge. |
static Traverser |
singletonTraverser(Graph graph,
Graph.Edge edge,
java.lang.Object endpoint)
Returns a modifiable, serializable Traverser over
the specified edge. |
static Graph |
synchronizedGraph(Graph g)
Returns a synchronized view of the specified Graph. |
static Graph |
synchronizedGraph(Graph g,
java.lang.Object mutex)
Returns a synchronized view of the specified Graph and synchronized upon the specified object. |
static ObservableGraph |
synchronizedObservableGraph(ObservableGraph g)
Returns a synchronized view of the specified ObservableGraph. |
static ObservableGraph |
synchronizedObservableGraph(ObservableGraph g,
java.lang.Object mutex)
Returns a synchronized view of the specified ObservableGraph and synchronized upon the
specified object. |
static Graph |
unmodifiableGraph(Graph g)
Returns an unmodifiable view of the specified Graph. |
static ObservableGraph |
unmodifiableObservableGraph(ObservableGraph g)
Returns an unmodifiable view of the specified ObservableGraph. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
EMPTY_TRAVERSER
public static final Traverser EMPTY_TRAVERSER
- An empty
Traverser.
ADJACENT_TRAVERSER_FACTORY
public static final TraverserFactory ADJACENT_TRAVERSER_FACTORY
- A
TraverserFactorywhich creates adjacent node traversers.- See Also:
- Graph.traverser( node ) 55
OUT_TRAVERSER_FACTORY
public static final TraverserFactory OUT_TRAVERSER_FACTORY
- A
TraverserFactorywhich creates out node traversers for directed graphs.- See Also:
- Graph.outTraverser( node ) 55
IN_TRAVERSER_FACTORY
public static final TraverserFactory IN_TRAVERSER_FACTORY
- A
TraverserFactorywhich creates in node traversers for directed graphs.- See Also:
- Graph.inTraverser( node ) 55
| Constructor Detail |
GraphUtils
private GraphUtils()
- Prevent instantiation.
| Method Detail |
add
public static void add(Graph destination, Graph source)
- Adds all the nodes and edges from
sourcetodestination. If the twoGraphsdo not match in what sort ofGraphthey are (one directed and the other undirected, e.g.), then a best effort is still made.
singletonEdgeIterator
public static java.util.Iterator singletonEdgeIterator(Graph graph, Graph.Edge edge)
- Returns a modifiable, serializable
Iteratorover the specified edge.
singletonTraverser
public static Traverser singletonTraverser(Graph graph, Graph.Edge edge, java.lang.Object endpoint)
- Returns a modifiable, serializable
Traverserover the specified edge.
unmodifiableGraph
public static Graph unmodifiableGraph(Graph g)
- Returns an unmodifiable view of the specified
Graph. The returnedGraphwill be serializable if the specifiedGraphis serializable.
unmodifiableObservableGraph
public static ObservableGraph unmodifiableObservableGraph(ObservableGraph g)
- Returns an unmodifiable view of the specified
ObservableGraph. The returnedObservableGraphwill be serializable if the specifiedObservableGraphis serializable. This wrapper method allows aGraphto be given to a user that the user can't modify, but that can still be watched for changes.
synchronizedGraph
public static Graph synchronizedGraph(Graph g)
- Returns a synchronized view of the specified
Graph. It is the user's responsibility to manually synchronize on the returnedGraphwhen iterating over it. The returnedGraphwill be serializable if the specifiedGraphis serializable.
synchronizedGraph
public static Graph synchronizedGraph(Graph g, java.lang.Object mutex)
- Returns a synchronized view of the specified
Graphand synchronized upon the specified object. It is the user's responsibility to manually synchronize onmutexwhen iterating over theGraph. The returnedGraphwill be serializable if the specifiedGraphis serializable.
synchronizedObservableGraph
public static ObservableGraph synchronizedObservableGraph(ObservableGraph g)
- Returns a synchronized view of the specified
ObservableGraph. It is the user's responsibility to manually synchronize on the returnedObservableGraphwhen iterating over it. The returnedObservableGraphwill be serializable if the specifiedObservableGraphis serializable.
synchronizedObservableGraph
public static ObservableGraph synchronizedObservableGraph(ObservableGraph g, java.lang.Object mutex)
- Returns a synchronized view of the specified
ObservableGraphand synchronized upon the specified object. It is the user's responsibility to manually synchronize onmutexwhen iterating over theObservableGraph. The returnedObservableGraphwill be serializable if the specifiedObservableGraphis serializable.
|
|||||||||
| Home >> All >> com >> phoenixst >> [ plexus overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.phoenixst.plexus.GraphUtils