E
- iterators typepublic class ObjectIteratorsIterator<E extends AbstractObject> extends AbstractObjectIterator<E>
Modifier and Type | Field and Description |
---|---|
protected java.util.Iterator<? extends E> |
currentIterator
Iterator from current iterator
|
protected E |
currentObject
Stored instance of object returned by the last call to next()
|
protected java.util.Queue<java.util.Iterator<? extends E>> |
iterators
Queue of iterators that are waiting to be scanned
|
Constructor and Description |
---|
ObjectIteratorsIterator(java.util.Collection<java.util.Iterator<E>> objectIterators)
Creates a new instance of ObjectIteratorsIterator
|
Modifier and Type | Method and Description |
---|---|
E |
getCurrentObject()
Returns an instance of object returned by the last call to next().
|
boolean |
hasNext()
Returns true if the iteration has more elements.
|
E |
next()
Returns the next element in the iteration.
|
void |
remove()
Removes from the underlying collection the last element returned by the
iterator (optional operation).
|
emptyIterator, getIterator, getMatchingObjects, getMatchingObjects, getMatchingObjects, getMatchingObjects, getObjectByAnyLocator, getObjectByData, getObjectByLocator, getObjectByLocator, getObjectByLocatorRegexp, getObjectByPosition, getRandomObject, getRandomObjects, provideObjects, singleton, skip
protected final java.util.Queue<java.util.Iterator<? extends E extends AbstractObject>> iterators
protected java.util.Iterator<? extends E extends AbstractObject> currentIterator
protected E extends AbstractObject currentObject
public ObjectIteratorsIterator(java.util.Collection<java.util.Iterator<E>> objectIterators)
objectIterators
- The source iterators that will provide objectspublic E getCurrentObject() throws java.util.NoSuchElementException
getCurrentObject
in class AbstractObjectIterator<E extends AbstractObject>
java.util.NoSuchElementException
- Exception NoSuchElementException is thrown if next() has not been called yet.public boolean hasNext()
public E next() throws java.util.NoSuchElementException
java.util.NoSuchElementException
- iteration has no more elements.public void remove() throws java.lang.UnsupportedOperationException, java.lang.IllegalStateException
java.lang.UnsupportedOperationException
- if the remove
operation is not supported by this Iterator.java.lang.IllegalStateException
- if the next method has not
yet been called, or the remove method has already
been called after the last call to the next
method.