Package org.graalvm.polyglot.proxy
Interface ProxyIterator
- All Superinterfaces:
Proxy
Interface to be implemented to mimic guest language iterators.
- Since:
- 21.1
- See Also:
-
Method Summary
-
Method Details
-
hasNext
boolean hasNext()Returnstrue
if the iterator has more elements, elsefalse
. Multiple calls to thehasNext()
might lead to different results if the underlying data structure is modified.- Since:
- 21.1
- See Also:
-
getNext
Returns the next element in the iteration. When the underlying data structure is modified thegetNext()
may throw theNoSuchElementException
even when thehasNext()
returnedtrue
.- Throws:
NoSuchElementException
- if the iteration has no more elements, thehasNext()
returnsfalse
.UnsupportedOperationException
- when the underlying iterator element exists but is not readable.- Since:
- 21.1
- See Also:
-
from
Creates a proxy iterator backed by a JavaIterator
. If the set values are host values then they will beunboxed
. If the JavaIterator
throws theConcurrentModificationException
the exception is translated into the host exception.- Since:
- 21.1
-