public interface ProxyIterator extends Proxy
Proxy
,
ProxyIterable
Modifier and Type | Method and Description |
---|---|
static ProxyIterator |
from(Iterator<?> iterator)
Creates a proxy iterator backed by a Java
Iterator . |
Object |
getNext()
Returns the next element in the iteration.
|
boolean |
hasNext()
Returns
true if the iterator has more elements, else false . |
boolean hasNext()
true
if the iterator has more elements, else false
.
Multiple calls to the ProxyIterator.hasNext()
might lead to different results if the underlying
data structure is modified.ProxyIterator.getNext()
Object getNext() throws NoSuchElementException, UnsupportedOperationException
ProxyIterator.getNext()
may throw the NoSuchElementException
even when the
ProxyIterator.hasNext()
returned true
.NoSuchElementException
- if the iteration has no more elements, the ProxyIterator.hasNext()
returns false
.UnsupportedOperationException
- when the underlying iterator element exists but is not
readable.ProxyIterator.hasNext()
static ProxyIterator from(Iterator<?> iterator)
Iterator
. If the set values are host values
then they will be unboxed
. If the Java Iterator
throws
the ConcurrentModificationException
the exception is translated into the host
exception.