E- The type of elements to be returned by the iterator.
@Decorator(value=java.util.Iterator.class) public abstract class DeferringIterator<E> extends Object implements Iterator<E>
next() method is invoked,
DeferringIterator first delegates to
next() method of the wrapped iterator, then gives the obtained element to the
isDeferred method. If
then the element is returned immediately. Otherwise the element is enqueued and will be
returned in queue insertion order only after all non-deferred elements have been returned
by this iterator.
Defined in the
|Modifier||Constructor and Description|
Creates a new deferring iterator.
|Modifier and Type||Method and Description|
Returns the next element in the iteration.
Removes the last element returned by the iterator.
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected abstract boolean isDeferred(E element)
trueif the given element should be deferred at the end of the iteration. This method is invoked by the
next()method for all objects returned by the wrapped iterator. If this method returns
true, then the given element will be returned immediately by the
next()method. Otherwise the element is enqueued and will be returned only after all non-deferred elements have been returned.
element- The object to test. May be
nullif the wrapped iterator can returns null elements.
trueif the given object should be deferred at the end of the iteration.
public boolean hasNext()
trueif the iteration has more elements.
public E next()
public void remove() throws UnsupportedOperationException
Copyright © 2009–2017 Geotoolkit.org. All rights reserved.