T - Type of the iterator's elements.public interface ElementIterator<T> extends Iterator<T>, Enumeration<T>
Iterator and Enumeration.| Modifier and Type | Method and Description |
|---|---|
default boolean |
hasMoreElements() |
default T |
nextElement() |
static <T> @NonNull ElementIterator<T> |
wrap(Enumeration<T> enumeration)
Wraps the given enumeration into a
ElementIterator. |
static <T> @NonNull ElementIterator<T> |
wrap(Iterator<T> iterator)
Wraps the given iterator into a
ElementIterator. |
forEachRemaining, hasNext, next, removestatic <T> @NonNull ElementIterator<T> wrap(Iterator<T> iterator)
ElementIterator.T - Type of the iterator's elements.iterator - The iterator to wrap.static <T> @NonNull ElementIterator<T> wrap(Enumeration<T> enumeration)
ElementIterator.T - Type of the iterator's elements.enumeration - The iterator to wrap.default boolean hasMoreElements()
hasMoreElements in interface Enumeration<T>default T nextElement()
nextElement in interface Enumeration<T>Copyright © 2014–2015. All rights reserved.