kiwi.util
Class VectorSequence

java.lang.Object
  |
  +--kiwi.util.VectorSequence

public class VectorSequence
extends Object
implements Sequence

An implementation of Sequence for wrapping Vectors.

Version:
1.0 (05/98)
Author:
Mark Lindner, PING Software Group

Constructor Summary
VectorSequence(Vector vector)
          Construct a new VectorSequence.
 
Method Summary
 int getSize()
          Get the size of the sequence.
 boolean hasMoreElements()
          Check if the sequence has more elements.
 Object nextElement()
          Get the next element in the sequence.
 void rewind()
          Rewind the sequence to the beginning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorSequence

public VectorSequence(Vector vector)
Construct a new VectorSequence.
Parameters:
vector - The Vector to wrap.
Method Detail

hasMoreElements

public boolean hasMoreElements()
Check if the sequence has more elements.
Returns:
true if there are more elements, and false otherwise.

nextElement

public Object nextElement()
Get the next element in the sequence.
Returns:
The next element in the sequence, or null if the end has been reached.

rewind

public void rewind()
Rewind the sequence to the beginning.
Specified by:
rewind in interface Sequence

getSize

public int getSize()
Get the size of the sequence.
Specified by:
getSize in interface Sequence
Returns:
The number of items in the sequence.