public static final class Spliterators.OfPrimitive extends Object
Spliterator.OfPrimitive| Modifier and Type | Method and Description |
|---|---|
static <T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>> |
forEachRemaining(Spliterator.OfPrimitive<T,T_CONS,T_SPLITR> this_,
T_CONS 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.
|
public static <T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>> void forEachRemaining(Spliterator.OfPrimitive<T,T_CONS,T_SPLITR> this_, T_CONS 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
Spliterator.OfPrimitive.tryAdvance(T_CONS) until it returns false.
It should be overridden whenever possible.
T - the type of elements returned by this Spliterator. The type
must be a wrapper type for a primitive type, such as Integer
for the primitive int type.T_CONS - the type of primitive consumer. The type must be a primitive
specialization of Consumer for T, such as IntConsumer for Integer.T_SPLITR - the type of primitive Spliterator. The type must be a
primitive specialization of Spliterator for T, such as
Spliterator.OfInt for Integer.this_ - the Spliterator whose remaining elements should be processedaction - The action to executeNullPointerException - if the specified this_ Spliterator is nullNullPointerException - if the specified action is nullCopyright © 2015. All rights reserved.