public static final class Spliterators.OfDouble
extends java.lang.Object
Spliterator.OfDouble
Modifier and Type | Method and Description |
---|---|
static void |
forEachRemaining(Spliterator.OfDouble this_,
Consumer<? super java.lang.Double> action)
Performs the given action for each remaining element, sequentially in
the current thread, until all elements have been processed or the action
throws an exception.
|
static void |
forEachRemaining(Spliterator.OfDouble this_,
DoubleConsumer action)
Performs the given action for each remaining element of the passed Spliterator,
sequentially in the current thread, until all elements have been processed or
the action throws an exception.
|
static boolean |
tryAdvance(Spliterator.OfDouble this_,
Consumer<? super java.lang.Double> action)
If a remaining element exists, performs the given action on it,
returning
true ; else returns false . |
public static void forEachRemaining(Spliterator.OfDouble this_, DoubleConsumer action)
this_
Spliterator is Spliterator.ORDERED
,
actions are performed in encounter order. Exceptions thrown by the
action are relayed to the caller.
Implementation Requirements:
The default implementation repeatedly invokes tryAdvance(java8.util.Spliterator.OfDouble, java8.util.function.Consumer<? super java.lang.Double>)
until it returns false
. It should be overridden whenever
possible.
this_
- the Spliterator whose remaining elements should be processedaction
- The action to executejava.lang.NullPointerException
- if the specified this_
Spliterator is nulljava.lang.NullPointerException
- if the specified action is nullpublic static boolean tryAdvance(Spliterator.OfDouble this_, Consumer<? super java.lang.Double> action)
true
; else returns false
. If the this_
Spliterator is Spliterator.ORDERED
the action is performed on the
next element in encounter order. Exceptions thrown by the
action are relayed to the caller.
Implementation Requirements:
If the action is an instance of DoubleConsumer
then it is
cast to DoubleConsumer
and passed to
Spliterator.OfDouble.tryAdvance(java8.util.function.DoubleConsumer)
; otherwise
the action is adapted to an instance of DoubleConsumer
, by
boxing the argument of DoubleConsumer
, and then passed to
Spliterator.OfDouble.tryAdvance(java8.util.function.DoubleConsumer)
.
this_
- the Spliterator to useaction
- The action to executefalse
if no remaining elements existed
upon entry to this method, else true
.java.lang.NullPointerException
- if the specified this_
Spliterator is nulljava.lang.NullPointerException
- if the specified action is nullpublic static void forEachRemaining(Spliterator.OfDouble this_, Consumer<? super java.lang.Double> action)
this_
Spliterator is Spliterator.ORDERED
, actions
are performed in encounter order. Exceptions thrown by the action
are relayed to the caller.
Implementation Requirements:
If the action is an instance of DoubleConsumer
then it is
cast to DoubleConsumer
and passed to
Spliterator.OfDouble.forEachRemaining(java8.util.function.DoubleConsumer)
;
otherwise the action is adapted to an instance of
DoubleConsumer
, by boxing the argument of
DoubleConsumer
, and then passed to
Spliterator.OfDouble.forEachRemaining(java8.util.function.DoubleConsumer)
.
this_
- the Spliterator to useaction
- The action to executejava.lang.NullPointerException
- if the specified this_
Spliterator is nulljava.lang.NullPointerException
- if the specified action is null