com.phoenixst.plexus.util

Class IncidentEdgeCollection

public class IncidentEdgeCollection extends AbstractCollection

A Collection for Graph.Edges to help implement the Graph.incidentEdges( Predicate ) method.

Since: 1.0

Version: $Revision: 1.7 $

Author: Ray A. Conner

Constructor Summary
IncidentEdgeCollection(Graph graph, Object baseNode, Predicate traverserPredicate)
Creates a new IncidentEdgeCollection.
Method Summary
booleanaddAll(Collection collection)
Throws an UnsupportedOperationException.
booleancontains(Object object)
This implementation delegates to Graph.containsEdge( Object ) if the specified object passes the Predicate specified by the constructor and is incident upon the baseNode.
Iteratoriterator()
This implementation returns a wrapper around Graph.traverser( node, predicate ).
booleanremove(Object object)
This implementation delegates to Graph.removeEdge( Object ) if the specified object passes the Predicate specified by the constructor and is incident upon the baseNode.
intsize()
This implementation delegates to Graph.degree( node, predicate ).

Constructor Detail

IncidentEdgeCollection

public IncidentEdgeCollection(Graph graph, Object baseNode, Predicate traverserPredicate)
Creates a new IncidentEdgeCollection. If a null Predicate is passed to this constructor, TruePredicate is used internally.

Method Detail

addAll

public boolean addAll(Collection collection)
Throws an UnsupportedOperationException.

contains

public boolean contains(Object object)
This implementation delegates to Graph.containsEdge( Object ) if the specified object passes the Predicate specified by the constructor and is incident upon the baseNode.

iterator

public Iterator iterator()
This implementation returns a wrapper around Graph.traverser( node, predicate ).

remove

public boolean remove(Object object)
This implementation delegates to Graph.removeEdge( Object ) if the specified object passes the Predicate specified by the constructor and is incident upon the baseNode.

size

public int size()
This implementation delegates to Graph.degree( node, predicate ).
See the Plexus project home, hosted by SourceForge.
Copyright B) 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.