com.phoenixst.plexus.util
public class AdjacentNodeCollection extends AbstractCollection
Collection for nodes to help implement the Graph.adjacentNodes( Predicate ) method.
Since: 1.0
Version: $Revision: 1.7 $
| Constructor Summary | |
|---|---|
| AdjacentNodeCollection(Graph graph, Object baseNode, Predicate traverserPredicate)
Creates a new AdjacentNodeCollection. | |
| Method Summary | |
|---|---|
| boolean | addAll(Collection collection)
Throws an UnsupportedOperationException. |
| boolean | contains(Object object)
This implementation uses Graph.traverser( node,
predicate ) and returns true, if found. |
| Iterator | iterator()
This implementation returns a wrapper around Graph.traverser( node,
predicate ). |
| boolean | remove(Object object)
This implementation uses Graph.traverser( node,
predicate ) and removes the Graph.Edge to the
node, if found. |
| int | size()
This implementation delegates to Graph.degree( node, predicate
). |
AdjacentNodeCollection. If a
null Predicate is passed to this
constructor, TruePredicate is used internally.UnsupportedOperationException. Graph.traverser( node,
predicate ) and returns true, if found. Graph.traverser( node,
predicate ). Graph.traverser( node,
predicate ) and removes the Graph.Edge to the
node, if found. Graph.degree( node, predicate
).