org.apache.ignite.ml.dataset.impl.cache.util

## Class IteratorWithConcurrentModificationChecker<T>

- java.lang.Object
- - org.apache.ignite.ml.dataset.impl.cache.util.IteratorWithConcurrentModificationChecker<T>

- Type Parameters:
    `T` - Type of entries.
  All Implemented Interfaces:
    Iterator<T>

      public class IteratorWithConcurrentModificationChecker<T>
      extends Object
      implements Iterator<T>

  Iterator wrapper that checks if number of entries in iterator is equal to expected.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IteratorWithConcurrentModificationChecker(Iterator<T> delegate, long expCnt, String eMsg)` Constructs a new instance of iterator checked wrapper.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()`
    `T` | `next()`

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

- - ### Constructor Detail

    - #### IteratorWithConcurrentModificationChecker

          public IteratorWithConcurrentModificationChecker(Iterator<T> delegate,
                                                           long expCnt,
                                                           String eMsg)

      Constructs a new instance of iterator checked wrapper.
      Parameters:
        `delegate` - Delegate.
        `expCnt` - Expected count of entries.

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<T>`

    - #### next

          public T next()

      Specified by:
        `next` in interface `Iterator<T>`

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022