Plexus v0.13.1

com.phoenixst.plexus.util
Class SingletonEdgeIterator

java.lang.Object
  extended by com.phoenixst.plexus.util.SingletonEdgeIterator
All Implemented Interfaces:
Iterator

public class SingletonEdgeIterator
extends Object
implements Iterator

An Iterator over a single Edge. remove() delegates to Graph.removeEdge( edge ).

An alternate constructor is provided to explicitly make the created Iterator unmodifiable.

Since:
1.0
Version:
$Revision: 1.7 $
Author:
Ray A. Conner

Constructor Summary
SingletonEdgeIterator(Graph.Edge edge)
          Creates a new unmodifiable SingletonEdgeIterator.
SingletonEdgeIterator(Graph graph, Graph.Edge edge)
          Creates a new modifiable SingletonEdgeIterator.
 
Method Summary
 boolean hasNext()
           
 Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonEdgeIterator

public SingletonEdgeIterator(Graph.Edge edge)
Creates a new unmodifiable SingletonEdgeIterator. If this constructor is used, remove() will throw an UnsupportedOperationException.

Parameters:
edge - the edge over which the returned Iterator iterates.

SingletonEdgeIterator

public SingletonEdgeIterator(Graph graph,
                             Graph.Edge edge)
Creates a new modifiable SingletonEdgeIterator.

Parameters:
graph - the graph containing the edge over which the returned Iterator iterates.
edge - the edge over which the returned Iterator iterates.
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator

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.