Most visited

Recently visited

Added in API level 24

Spliterator.OfDouble

public static interface Spliterator.OfDouble
implements OfPrimitive<DoubleDoubleConsumerSpliterator.OfDouble>

java.util.Spliterator.OfDouble
Known Indirect Subclasses


Spliterator专门为 double值。

Summary

Inherited constants

From interface java.util.Spliterator

Public methods

default void forEachRemaining(Consumer<? super Double> action)

default void forEachRemaining(DoubleConsumer action)
abstract boolean tryAdvance(DoubleConsumer action)
default boolean tryAdvance(Consumer<? super Double> action)

abstract Spliterator.OfDouble trySplit()

如果这个分割器可以被分割,返回一个Spliterator覆盖元素,当从这个方法返回时,不会被这个分割器覆盖。

Inherited methods

From interface java.util.Spliterator.OfPrimitive
From interface java.util.Spliterator

Public methods

forEachRemaining

Added in API level 24
void forEachRemaining (Consumer<? super Double> action)

实现要求:
Parameters
action Consumer

forEachRemaining

Added in API level 24
void forEachRemaining (DoubleConsumer action)

Parameters
action DoubleConsumer

tryAdvance

Added in API level 24
boolean tryAdvance (DoubleConsumer action)

Parameters
action DoubleConsumer
Returns
boolean

tryAdvance

Added in API level 24
boolean tryAdvance (Consumer<? super Double> action)

实现要求:
Parameters
action Consumer
Returns
boolean

trySplit

Added in API level 24
Spliterator.OfDouble trySplit ()

如果这个分割器可以被分割,返回一个Spliterator覆盖元素,当从这个方法返回时,不会被这个分割器覆盖。

如果此Spliterator为 ORDERED ,则返回的Spliterator必须覆盖元素的严格前缀。

除非此Spliterator覆盖无限数量的元素,否则重复调用trySplit()必须最终返回null 非空返回时:

  • the value reported for estimateSize() before splitting, must, after splitting, be greater than or equal to estimateSize() for this and the returned Spliterator; and
  • if this Spliterator is SUBSIZED, then estimateSize() for this spliterator before splitting must be equal to the sum of estimateSize() for this and the returned Spliterator after splitting.

此方法可能因任何原因返回 null ,包括空行,遍历开始后无法拆分,数据结构约束和效率考虑因素。

Returns
Spliterator.OfDouble a Spliterator covering some portion of the elements, or null if this spliterator cannot be split

Hooray!