kiwi.util
Interface Sequence

All Known Implementing Classes:
ArraySequence, VectorSequence

public abstract interface Sequence
extends Enumeration

An extension of Enumeration that allows rewinding to the first component and retrieval of the number of items in the collection. This interface can be useful in situations where an immutable collection of (possibly mutable) objects must be passed between objects, and where the sequential access provided by Enumeration is not sufficiently flexible.

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

Method Summary
 int getSize()
          Get the length of the sequence.
 void rewind()
          Rewind the sequence back to the first item.
 
Methods inherited from interface java.util.Enumeration
hasMoreElements, nextElement
 

Method Detail

rewind

public void rewind()
Rewind the sequence back to the first item.

getSize

public int getSize()
Get the length of the sequence.
Returns:
The number of items in the sequence.