Plexus v0.13.1

com.phoenixst.plexus.util
Class AbstractNodeCollection

java.lang.Object
  extended by java.util.AbstractCollection
      extended by com.phoenixst.plexus.util.AbstractNodeCollection
All Implemented Interfaces:
Iterable, Collection

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
 boolean addAll(Collection collection)
          Throws an UnsupportedOperationException.
 boolean contains(Object object)
          This implementation delegates to Graph.containsNode( Object ).
 boolean isEmpty()
          This implementation returns true if the iterator().hasNext() returns false.
 boolean remove(Object object)
          This implementation delegates to Graph.removeNode( Object ).
 int size()
          This implementation counts the number of elements accessed by the iterator() method.
 
Methods inherited from class java.util.AbstractCollection
add, clear, containsAll, iterator, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

AbstractNodeCollection

protected AbstractNodeCollection(Graph graph)
Creates a new AbstractNodeCollection.

Method Detail

size

public int size()
This implementation counts the number of elements accessed by the iterator() method.

Specified by:
size in interface Collection
Specified by:
size in class AbstractCollection

isEmpty

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

Specified by:
isEmpty in interface Collection
Overrides:
isEmpty in class AbstractCollection

remove

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

Specified by:
remove in interface Collection
Overrides:
remove in class AbstractCollection

contains

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

Specified by:
contains in interface Collection
Overrides:
contains in class AbstractCollection

addAll

public boolean addAll(Collection collection)
Throws an UnsupportedOperationException.

Specified by:
addAll in interface Collection
Overrides:
addAll in class AbstractCollection

Plexus v0.13.1

See 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.