# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Nested Classes | Methods | Inherited Methods

# PrimitiveIterator

`public interface PrimitiveIterator`
`implements Iterator<T>`

java.util.PrimitiveIterator<T, T_CONS>

Known indirect subclasses PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong
PrimitiveIterator.OfDouble | An Iterator specialized for `double` values.
PrimitiveIterator.OfInt | An Iterator specialized for `int` values.
PrimitiveIterator.OfLong | An Iterator specialized for `long` values.

A base type for primitive specializations of `Iterator`. Specialized subtypes are provided for `OfInt`, `OfLong`, and `OfDouble` values.

The specialized subtype default implementations of `Iterator#next` and `Iterator#forEachRemaining(java.util.function.Consumer)` box primitive values to instances of their corresponding wrapper class. Such boxing may offset any advantages gained when using the primitive specializations. To avoid boxing, the corresponding primitive-based methods should be used. For example, `PrimitiveIterator.OfInt#nextInt()` and `PrimitiveIterator.OfInt#forEachRemaining(java.util.function.IntConsumer)` should be used in preference to `PrimitiveIterator.OfInt#next()` and `PrimitiveIterator.OfInt#forEachRemaining(java.util.function.Consumer)`.

Iteration of primitive values using boxing-based methods `Iterator#next` and `Iterator#forEachRemaining(java.util.function.Consumer)`, does not affect the order in which the values, transformed to boxed values, are encountered.

## Summary

### Nested classes
`interface` | `PrimitiveIterator.OfDouble` An Iterator specialized for `double` values.
`interface` | `PrimitiveIterator.OfInt` An Iterator specialized for `int` values.
`interface` | `PrimitiveIterator.OfLong` An Iterator specialized for `long` values.

### Public methods
`abstract void` | `forEachRemaining(T_CONS action)` Performs the given action for each remaining element, in the order elements occur when iterating, until all elements have been processed or the action throws an exception.

### Inherited methods
From interface `java.util.Iterator`
`default void` | `forEachRemaining(Consumer<? super E> action)` Performs the given action for each remaining element until all elements have been processed or the action throws an exception.
`abstract boolean` | `hasNext()` Returns `true` if the iteration has more elements.
`abstract T` | `next()` Returns the next element in the iteration.
`default void` | `remove()` Removes from the underlying collection the last element returned by this iterator (optional operation).

## Public methods

### forEachRemaining

    public abstract void forEachRemaining (T_CONS action)

Performs the given action for each remaining element, in the order elements occur when iterating, until all elements have been processed or the action throws an exception. Errors or runtime exceptions thrown by the action are relayed to the caller.

Parameters
`action` | `T_CONS`: The action to be performed for each element

Throws
`NullPointerException` | if the specified action is null

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*