Top Description Fields Constructors Methods
org.codehaus.commons.compiler.util.iterator

public Class EnumerationIterator<T>

extends Object
implements Iterator<T>
Class Inheritance
All Implemented Interfaces
java.util.Iterator
Type Parameters
<T>
The element type of the enumeration and the iterator
Imports
java.util.Enumeration, .Iterator

An java.util.Iterator that iterates over the elements of an java.util.Enumeration.

Field Summary

Modifier and TypeField and Description
private final Enumeration<? extends T>
e

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.
public T
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.
public void
remove()

Overrides default java.util.Iterator.remove.

Since Enumerations don't support element removal, this method always throws an UnsupportedOperationException.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

eback to summary
private final Enumeration<? extends T> e

Constructor Detail

EnumerationIteratorback to summary
public EnumerationIterator(Enumeration<? extends T> e)

Method Detail

hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
nextback to summary
public T next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:T

the next element in the iteration

Annotations
@Override
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Since Enumerations don't support element removal, this method always throws an UnsupportedOperationException.

Annotations
@Override
See Also
Iterator#remove()