public class AdjacentNodeCollection extends AbstractCollection
Collection for nodes to help implement the Graph.adjacentNodes( Predicate ) method.| Constructor and Description |
|---|
AdjacentNodeCollection(Graph graph,
Object baseNode,
org.apache.commons.collections.Predicate traverserPredicate)
Creates a new
AdjacentNodeCollection. |
| Modifier and Type | Method and Description |
|---|---|
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
). |
add, clear, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCodepublic AdjacentNodeCollection(Graph graph, Object baseNode, org.apache.commons.collections.Predicate traverserPredicate)
AdjacentNodeCollection. If a
null Predicate is passed to this
constructor, TruePredicate is used internally.public int size()
Graph.degree( node, predicate
).size in interface Collectionsize in class AbstractCollectionpublic boolean remove(Object object)
Graph.traverser( node,
predicate ) and removes the Graph.Edge to the
node, if found.remove in interface Collectionremove in class AbstractCollectionpublic boolean contains(Object object)
Graph.traverser( node,
predicate ) and returns true, if found.contains in interface Collectioncontains in class AbstractCollectionpublic Iterator iterator()
Graph.traverser( node,
predicate ).iterator in interface Iterableiterator in interface Collectioniterator in class AbstractCollectionpublic boolean addAll(Collection collection)
UnsupportedOperationException.addAll in interface CollectionaddAll in class AbstractCollectionSee the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.