com.hazelcast.util.collection

## Class LongIterator

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

- All Implemented Interfaces:
    Iterator<Long>

      public class LongIterator
      extends Object
      implements Iterator<Long>

  An iterator for a sequence of primitive integers.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LongIterator(long missingValue, long[] values)` Construct an `Iterator` over an array of primitives longs.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()`
    `Long` | `next()`
    `long` | `nextValue()` Strongly typed alternative of `Iterator.next()` not 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

    - #### LongIterator

          public LongIterator(long missingValue,
                              long[] values)

      Construct an `Iterator` over an array of primitives longs.
      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<Long>`

    - #### next

          public Long next()

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

    - #### remove

          public void remove()

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

    - #### nextValue

          public long nextValue()

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

Copyright © 2020. All rights reserved.