E - The element type for this iterator.@Status(stage=PRODUCTION, unitTests=COMPLETE) public class RoundRobinElementIterator<E> extends Object implements Iterator<E>
| Constructor and Description |
|---|
RoundRobinElementIterator(List<E> elements)
Creates this RoundRobinElementIterator using the supplied elements.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Determines whether there are more elements to get.
|
E |
next()
Gets the next element.
|
void |
remove()
Throws an UnsupportedOperationException.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic RoundRobinElementIterator(List<E> elements)
elements - The list of element to return in round-robin fashion.IllegalArgumentException - When the supplied list of elements is empty.NullPointerException - When the supplied list of elements is null.public boolean hasNext()
public E next()
public void remove()
remove in interface Iterator<E>UnsupportedOperationException - Always.Copyright © 2008–2017. All rights reserved.