T
- the type of element to iterate overpublic static class ModuleClassLoader.CompoundIterator<T> extends Object implements Enumeration<T>
Modifier and Type | Field and Description |
---|---|
protected boolean |
doFirst
Flag that tells whether to return the first element next.
|
protected Enumeration<T> |
theContinued
The Enumeration over all other elements to return after the first.
|
protected T |
theFirstElement
The first element to return.
|
Constructor and Description |
---|
CompoundIterator(T firstElement,
Enumeration<T> continued)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreElements()
Tests if this enumeration contains more elements.
|
T |
nextElement()
Returns the next element of this enumeration if this enumeration
object has at least one more element to provide.
|
protected T theFirstElement
protected Enumeration<T> theContinued
protected boolean doFirst
public CompoundIterator(T firstElement, Enumeration<T> continued)
firstElement
- the first element to returncontinued
- Enumeration over the remaining elementspublic boolean hasMoreElements()
hasMoreElements
in interface Enumeration<T>
true
if and only if this enumeration object
contains at least one more element to provide;
false
otherwise.public T nextElement()
nextElement
in interface Enumeration<T>
NoSuchElementException
- if no more elements exist.Copyright © 2018. All rights reserved.