|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.resources.util.IteratorEnumeration
public class IteratorEnumeration
Two way Adaptor class for java.util.Iterator and java.util.Enumeration.
Constructor Summary | |
---|---|
IteratorEnumeration(Enumeration enumeration)
Construct an instance which wraps an Enumeration. |
|
IteratorEnumeration(Iterator iterator)
Construct an instance which wraps an Iterator. |
Method Summary | |
---|---|
boolean |
hasMoreElements()
Indicates whether the wrapped Iterator/Enumeration has more elements. |
boolean |
hasNext()
Indicates whether the wrapped Iterator/Enumeration has more elements. |
Object |
next()
Returns the next element in the wrapped Iterator/Enumeration . |
Object |
nextElement()
Returns the next element in the wrapped Iterator/Enumeration . |
void |
remove()
remove() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IteratorEnumeration(Iterator iterator)
iterator
- The Iterator
to wrap.public IteratorEnumeration(Enumeration enumeration)
enumeration
- The Enumeration
to wrap.Method Detail |
---|
public void remove()
remove() is not supported.
- Specified by:
remove
in interface Iterator
- Throws:
UnsupportedOperationException
- always.
public boolean hasNext()
Iterator/Enumeration
has more elements.
hasNext
in interface Iterator
true
if the wrapped
Iterator/Enumeration
has more elements.public Object next()
Iterator/Enumeration
.
next
in interface Iterator
public boolean hasMoreElements()
Iterator/Enumeration
has more elements.
hasMoreElements
in interface Enumeration
true
if the wrapped
Iterator/Enumeration
has more elements.public Object nextElement()
Iterator/Enumeration
.
nextElement
in interface Enumeration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |