com.phoenixst.plexus
public class FilteredGraph extends AbstractGraph implements ObservableGraph
Graph
implementation. Unlike other
Graph
wrappers and implementations, and in violation
of the contract for Graph.Edge.equals()
,
the Edges
produced by this Graph
are not
wrapped.
Since: 1.0
Version: $Revision: 1.44 $
Constructor Summary | |
---|---|
FilteredGraph(Graph delegate, Predicate nodePredicate, Predicate edgePredicate)
Creates a new FilteredGraph . | |
protected | FilteredGraph()
This constructor, together with FilteredGraph, allows a subclass to initialize the
internal state during deserialization. |
Method Summary | |
---|---|
Graph.Edge | addEdge(Object object, Object tail, Object head, boolean isDirected) |
void | addGraphListener(GraphListener listener)
Adds the specified GraphListener which will be
notified whenever this ObservableGraph's
structure changes. |
boolean | addNode(Object node) |
boolean | containsEdge(Graph.Edge edge) |
boolean | containsNode(Object node) |
protected Collection | edges() |
protected Graph | getDelegate()
Provides accesss to the internal state so it can be manually
serialized by a subclass's writeObject() method. |
protected Predicate | getEdgePredicate()
Provides accesss to the internal state so it can be manually
serialized by a subclass's writeObject() method. |
protected Predicate | getNodePredicate()
Provides accesss to the internal state so it can be manually
serialized by a subclass's writeObject() method. |
protected void | initialize(Graph delegateGraph, Predicate nodePred, Predicate edgePred)
This method should only be called by subclasses during
deserialization. |
protected Collection | nodes() |
boolean | removeEdge(Graph.Edge edge) |
void | removeGraphListener(GraphListener listener)
Removes a previously added GraphListener . |
boolean | removeNode(Object node) |
protected Traverser | traverser(Object node) |
FilteredGraph
.GraphListener
which will be
notified whenever this ObservableGraph's
structure changes. If the wrapped graph does not implement
ObservableGraph, then this method with throw an
UnsupportedOperationException
.writeObject()
method.writeObject()
method.writeObject()
method.GraphListener
. If the
wrapped graph does not implement ObservableGraph, then
this method with throw an
UnsupportedOperationException
.