com.hazelcast.util.collection

## Class IntIterator

- java.lang.Object
- - com.hazelcast.util.collection.IntIterator

- All Implemented Interfaces:
    Iterator<Integer>

      public class IntIterator
      extends Object
      implements Iterator<Integer>

  An iterator for a sequence of primitive integers.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IntIterator(int missingValue, int[] values)` Construct an `Iterator` over an array of primitives ints.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()`
    `Integer` | `next()`
    `int` | `nextValue()` Strongly typed alternative of `Iterator.next()` to avoid boxing.
    `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`

- - ### Constructor Detail

    - #### IntIterator

          public IntIterator(int missingValue,
                             int[] values)

      Construct an `Iterator` over an array of primitives ints.
      Parameters:
        `missingValue` - to indicate the value is missing, i.e. not present or null.
        `values` - to iterate over.

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

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

    - #### next

          public Integer next()

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

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator<Integer>`

    - #### nextValue

          public int nextValue()

      Strongly typed alternative of `Iterator.next()` to avoid boxing.
      Returns:
        the next int value.

Copyright © 2019. All rights reserved.