E
- iterators typepublic class IteratorToAbstractObjectIterator<E extends AbstractObject> extends AbstractObjectIterator<E>
AbstractObjectIterator
.Modifier and Type | Field and Description |
---|---|
protected E |
currentObject
Stored instance of object returned by the last call to next()
|
protected java.util.Iterator<? extends E> |
iterator
Iterator from current iterator
|
Constructor and Description |
---|
IteratorToAbstractObjectIterator(java.util.Iterator<E> objectIterator)
Creates a new instance of IteratorToAbstractObjectIterator
|
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 java.util.Iterator<? extends E extends AbstractObject> iterator
protected E extends AbstractObject currentObject
public IteratorToAbstractObjectIterator(java.util.Iterator<E> objectIterator)
objectIterator
- The source iterator 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.