Class AbortiveMultiIterator<T>
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.util.iterator.AbortiveMultiIterator<T>
-
- All Implemented Interfaces:
Serializable
,AutoCloseable
,Iterator<T>
public final class AbortiveMultiIterator<T> extends Object implements Iterator<T>, Serializable, AutoCloseable
AnIterator
that checks aPredicate
prior to processing the specified childIterator
instances.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbortiveMultiIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIterator(Iterator<T> iterator)
Adds anIterator
that will always be iterated.void
addIterator(Iterator<T> iterator, Predicate<Long> check)
Adds anIterator
that will iterate only if thecheck
passes.void
clear()
void
close()
Close the underlying iterators if auto-closeable.boolean
hasNext()
T
next()
void
remove()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Method Detail
-
addIterator
public void addIterator(Iterator<T> iterator)
Adds anIterator
that will always be iterated.
-
addIterator
public void addIterator(Iterator<T> iterator, Predicate<Long> check)
Adds anIterator
that will iterate only if thecheck
passes.- Parameters:
check
- when returningtrue
processing of the associatedIterator
will proceed
-
clear
public void clear()
-
close
public void close()
Close the underlying iterators if auto-closeable. Note that when Exception is thrown from any iterator in the for loop on closing, remaining iterators possibly left unclosed.- Specified by:
close
in interfaceAutoCloseable
-
-