com.phoenixst.plexus.util

Class AbstractNodeCollection

public abstract class AbstractNodeCollection extends AbstractCollection

An abstract Collection for nodes to help implement the Graph.nodes( Predicate ) method.

Since: 1.0

Version: $Revision: 1.6 $

Author: Ray A. Conner

Constructor Summary
protected AbstractNodeCollection(Graph graph)
Creates a new AbstractNodeCollection.
Method Summary
booleanaddAll(Collection collection)
Throws an UnsupportedOperationException.
booleancontains(Object object)
This implementation delegates to Graph.containsNode( Object ).
booleanisEmpty()
This implementation returns true if the iterator().hasNext() returns false.
booleanremove(Object object)
This implementation delegates to Graph.removeNode( Object ).
intsize()
This implementation counts the number of elements accessed by the iterator() method.

Constructor Detail

AbstractNodeCollection

protected AbstractNodeCollection(Graph graph)
Creates a new AbstractNodeCollection.

Method Detail

addAll

public boolean addAll(Collection collection)
Throws an UnsupportedOperationException.

contains

public boolean contains(Object object)
This implementation delegates to Graph.containsNode( Object ).

isEmpty

public boolean isEmpty()
This implementation returns true if the iterator().hasNext() returns false.

remove

public boolean remove(Object object)
This implementation delegates to Graph.removeNode( Object ).

size

public int size()
This implementation counts the number of elements accessed by the iterator() method.
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.