Package apoc.bolt
Class ClosedAwareDelegatingIterator<T>
- java.lang.Object
-
- apoc.bolt.ClosedAwareDelegatingIterator<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
java.util.Iterator<T>
public class ClosedAwareDelegatingIterator<T> extends java.lang.Object implements java.util.Iterator<T>
if we would pass through a bolt result stream directly as a procedure result stream, there's an issue regarding hasNext() throwing an exception. This wrapper class catches the exception and deals with it gracefully
-
-
Constructor Summary
Constructors Constructor Description ClosedAwareDelegatingIterator(java.util.Iterator<T> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
forEachRemaining(java.util.function.Consumer<? super T> action)
boolean
hasNext()
T
next()
void
remove()
-
-
-
Constructor Detail
-
ClosedAwareDelegatingIterator
public ClosedAwareDelegatingIterator(java.util.Iterator<T> delegate)
-
-