Added in API level 24

OfDouble

interface OfDouble : PrimitiveIterator<Double!, DoubleConsumer!>
java.util.PrimitiveIterator.OfDouble

An Iterator specialized for double values.

Summary

Public methods
open Unit

Performs the given action for each remaining element until all elements have been processed or the action throws an exception.

open Unit

Performs the given action for each remaining element until all elements have been processed or the action throws an exception.

open Double!

Returns the next element in the iteration.

abstract Double

Returns the next double element in the iteration.

Public methods

forEachRemaining

Added in API level 24
open fun forEachRemaining(action: Consumer<in Double!>): Unit

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.

The behavior of an iterator is unspecified if the action modifies the collection in any way (even by calling the remove method or other mutator methods of Iterator subtypes), unless an overriding class has specified a concurrent modification policy.

Subsequent behavior of an iterator is unspecified if the action throws an exception.

Parameters
action Consumer<in Double!>: The action to be performed for each element
Exceptions
java.lang.NullPointerException if the specified action is null

forEachRemaining

Added in API level 24
open fun forEachRemaining(action: DoubleConsumer!): Unit

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.

The behavior of an iterator is unspecified if the action modifies the source of elements in any way (even by calling the remove method or other mutator methods of Iterator subtypes), unless an overriding class has specified a concurrent modification policy.

Subsequent behavior of an iterator is unspecified if the action throws an exception.

Parameters
action DoubleConsumer!: The action to be performed for each element
Exceptions
java.lang.NullPointerException if the specified action is null

next

Added in API level 24
open fun next(): Double!

Returns the next element in the iteration.

Return
Double! the next element in the iteration
Exceptions
java.util.NoSuchElementException if the iteration has no more elements

nextDouble

Added in API level 24
abstract fun nextDouble(): Double

Returns the next double element in the iteration.

Return
Double the next double element in the iteration
Exceptions
java.util.NoSuchElementException if the iteration has no more elements