org.apache.velocity.util

Class EnumerationIterator

Implemented Interfaces:
Iterator

public class EnumerationIterator
extends java.lang.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

private Enumeration
enum
The enumeration to iterate.

Constructor Summary

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

Method Summary

boolean
hasNext()
Check to see if there is another element in the array.
Object
next()
Move to next element in the array.
void
remove()
Unimplemented.

Field Details

enum

private Enumeration enum
The enumeration to iterate.

Constructor Details

EnumerationIterator

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

Parameters:
enum - The Enumeration to wrap.

Method Details

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.