org.apache.ignite.internal.util.lang.gridfunc

## 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 and Description
`FlatIterator(Iterable<?> iterable)`

### Method Summary

Methods
`boolean` `hasNextX()` This method is the same as `Iterator.hasNext()`, but allows for failure with exception.
`T` `nextX()` This method is the same as `Iterator.next()`, but allows for failure with exception.
`void` `removeX()` This method is the same as `Iterator.remove()`, but allows for failure with exception.
`String` `toString()`

### 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`

### Constructor Detail

#### FlatIterator

    public FlatIterator(Iterable<?> iterable)

Parameters:
  `iterable` - Input iterable of iterators.

### Method Detail

#### hasNextX

    public boolean hasNextX()

This method is the same as `Iterator.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 returning `false` out of `Iterator.hasNext()` method.

Returns:
  `True` if iterator contains more elements.
See Also:
  `Iterator.hasNext()`

#### nextX

    public T nextX()

This method is the same as `Iterator.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 throwing `NoSuchElementException` runtime exception.s

Returns:
  `True` if iterator contains more elements.
See Also:
  `Iterator.next()`

#### removeX

    public void removeX()

This method is the same as `Iterator.remove()`, but allows for failure with exception.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.2.0
Release Date | : September 15 2017