org.apache.ignite.internal.util

## Class GridEmptyIterator<T>

- java.lang.Object
- - org.apache.ignite.internal.util.lang.GridIteratorAdapter<T>
  - - org.apache.ignite.internal.util.GridEmptyIterator<T>

All Implemented Interfaces:
  Serializable, Iterable<T>, Iterator<T>, GridSerializableIterator<T>, GridIterator<T>

Direct Known Subclasses:
  GridEmptyCloseableIterator

    public class GridEmptyIterator<T>
    extends GridIteratorAdapter<T>

Empty iterator.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`GridEmptyIterator()`

### Method Summary

All Methods Instance Methods Concrete 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`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Methods inherited from interface java.util.Iterator

`forEachRemaining`

### Constructor Detail

#### GridEmptyIterator

    public GridEmptyIterator()

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

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021