Class FlatIterator<T>
- java.lang.Object
-
- org.apache.ignite.internal.util.lang.GridIteratorAdapter<T>
-
- org.apache.ignite.internal.util.lang.gridfunc.FlatIterator<T>
-
- Type Parameters:
T- Type of the inner iterators.
- All Implemented Interfaces:
Serializable,Iterable<T>,Iterator<T>,GridSerializableIterator<T>,GridIterator<T>
public class FlatIterator<T> extends GridIteratorAdapter<T>
Iterator over the elements of given iterators.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FlatIterator(Iterable<?> iterable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNextX()This method is the same asIterator.hasNext(), but allows for failure with exception.TnextX()This method is the same asIterator.next(), but allows for failure with exception.voidremoveX()This method is the same asIterator.remove(), but allows for failure with exception.StringtoString()-
Methods inherited from class org.apache.ignite.internal.util.lang.GridIteratorAdapter
hasNext, iterator, next, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
FlatIterator
public FlatIterator(Iterable<?> iterable)
- Parameters:
iterable- Input iterable of iterators.
-
-
Method Detail
-
hasNextX
public boolean hasNextX()
This method is the same asIterator.hasNext(), but allows for failure with exception. Often iterators are used to iterate through values that have not or have partially been received from remote nodes, and need to account for possible network failures, rather than just returningfalseout ofIterator.hasNext()method.- Returns:
Trueif iterator contains more elements.- See Also:
Iterator.hasNext()
-
nextX
public T nextX()
This method is the same asIterator.next(), but allows for failure with exception. Often iterators are used to iterate through values that have not or have partially been received from remote nodes, and need to account for possible network failures, rather than throwingNoSuchElementExceptionruntime exception.s- Returns:
Trueif iterator contains more elements.- See Also:
Iterator.next()
-
removeX
public void removeX()
This method is the same asIterator.remove(), but allows for failure with exception.
-
-