org.apache.velocity.util

Class EnumerationIterator

public class EnumerationIterator extends Object implements Iterator

An Iterator wrapper for an Enumeration.

Version: $Id: EnumerationIterator.java,v 1.1.14.1 2004/03/03 23:23:07 geirm Exp $

Author: Geir Magnusson Jr.

Field Summary
Enumerationenumer
The enumeration to iterate.
Constructor Summary
EnumerationIterator(Enumeration enumer)
Creates a new iteratorwrapper instance for the specified Enumeration.
Method Summary
booleanhasNext()
Check to see if there is another element in the array.
Objectnext()
Move to next element in the array.
voidremove()
Unimplemented.

Field Detail

enumer

private Enumeration enumer
The enumeration to iterate.

Constructor Detail

EnumerationIterator

public EnumerationIterator(Enumeration enumer)
Creates a new iteratorwrapper instance for the specified Enumeration.

Parameters: enumer The Enumeration to wrap.

Method Detail

hasNext

public boolean hasNext()
Check to see if there is another element in the array.

Returns: Whether there is another element.

next

public Object next()
Move to next element in the array.

Returns: The next object in the array.

remove

public void remove()
Unimplemented. No analogy in Enumeration
Copyright B) 2002 Apache Software Foundation. All Rights Reserved.