com.phoenixst.plexus.util
public class FilteredGraphListener extends ForwardingGraphListener
GraphListener which filters events to be forwarded
to an ObservableGraphDelegate. Instances of this class
only keep a WeakReference to their delegates. If
that Reference has been cleared when an event is received, this
listener will remove itself as a listener of the
Graph which sent the event. Because of this, it is
necessary for the Graph which is using this listener
to maintain a strong reference to the
ObservableGraphDelegate.
Since: 1.0
Version: $Revision: 1.3 $
| Constructor Summary | |
|---|---|
| FilteredGraphListener(Predicate nodePredicate, Predicate edgePredicate, ObservableGraphDelegate observableDelegate) | |
| Method Summary | |
|---|---|
| void | edgeAdded(GraphEvent event) |
| void | edgeRemoved(GraphEvent event) |
| void | nodeAdded(GraphEvent event) |
| void | nodeRemoved(GraphEvent event) |