JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.alsUtility
Class VectorIterator

java.lang.Object
  extended bygov.nasa.alsUtility.VectorIterator
All Implemented Interfaces:
Iterator
Direct Known Subclasses:
EdgeIterator, VertexIterator

public class VectorIterator
extends java.lang.Object
implements Iterator


Field Summary
protected  int place
          the index of the next element
protected  java.util.Vector vector
          the vector to iterate over
 
Constructor Summary
VectorIterator(java.util.Vector v)
           
 
Method Summary
 boolean more()
          are there any more objects to iterate over?
 void next()
          move to the next element
 java.lang.Object object()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vector

protected java.util.Vector vector
the vector to iterate over


place

protected int place
the index of the next element

Constructor Detail

VectorIterator

public VectorIterator(java.util.Vector v)
Parameters:
v - the vector to iterate over.
Method Detail

more

public boolean more()
are there any more objects to iterate over?

Specified by:
more in interface Iterator
Returns:
true if there are more objects to iterator over

next

public void next()
move to the next element

Specified by:
next in interface Iterator

object

public java.lang.Object object()
Specified by:
object in interface Iterator
Returns:
the next element

JavaGenes, NASA Ames. Written largely by Al Globus