# PrimitiveIterator.OfDouble

public static interface **PrimitiveIterator.OfDouble** implements [PrimitiveIterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/PrimitiveIterator.html)\<[Double](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Double.html), [DoubleConsumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/DoubleConsumer.html)\> An Iterator specialized for `double` values.

### Public Method Summary

|---|---|
| void | [forEachRemaining](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/PrimitiveIterator.OfDouble.html#forEachRemaining(java.util.function.Consumer<?%20super%20java.lang.Double>))([Consumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/Consumer.html)\<? super [Double](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Double.html)\> action) |
| void | [forEachRemaining](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/PrimitiveIterator.OfDouble.html#forEachRemaining(java.util.function.DoubleConsumer))([DoubleConsumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/DoubleConsumer.html) action) Performs the given action for each remaining element until all elements have been processed or the action throws an exception. |
| [Double](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Double.html) | [next](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/PrimitiveIterator.OfDouble.html#next())() Returns the next element in the iteration. |
| abstract double | [nextDouble](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/PrimitiveIterator.OfDouble.html#nextDouble())() Returns the next `double` element in the iteration. |

### Inherited Method Summary

From interface [java.util.PrimitiveIterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/PrimitiveIterator.html)

|---|---|
| abstract void | [forEachRemaining](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/PrimitiveIterator.html#forEachRemaining(T_CONS))([DoubleConsumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/DoubleConsumer.html) 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. |

From interface [java.util.Iterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Iterator.html)

|---|---|
| void | [forEachRemaining](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Iterator.html#forEachRemaining(java.util.function.Consumer<?%20super%20E>))([Consumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/Consumer.html)\<? 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](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Iterator.html#hasNext())() Returns `true` if the iteration has more elements. |
| abstract [Double](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Double.html) | [next](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Iterator.html#next())() Returns the next element in the iteration. |
| void | [remove](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Iterator.html#remove())() Removes from the underlying collection the last element returned by this iterator (optional operation). |

## Public Methods

#### public void
**forEachRemaining**
([Consumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/Consumer.html)\<? super [Double](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Double.html)\> action)

<br />

##### Parameters

| action |   |
|---|---|

#### public void
**forEachRemaining**
([DoubleConsumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/DoubleConsumer.html) action)

Performs the given action for each remaining element until all elements
have been processed or the action throws an exception. Actions are
performed in the order of iteration, if that order is specified.
Exceptions thrown by the action are relayed to the caller.

##### Parameters

| action | The action to be performed for each element |
|---|---|

##### Throws

| [NullPointerException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/NullPointerException.html) | if the specified action is null |
|---|---|

#### public [Double](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Double.html)
**next**
()

Returns the next element in the iteration.

##### Returns

- the next element in the iteration

#### public abstract double
**nextDouble**
()

Returns the next `double` element in the iteration.

##### Returns

- the next `double` element in the iteration

##### Throws

| [NoSuchElementException](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/NoSuchElementException.html) | if the iteration has no more elements |
|---|---|