|
FlexDoc/Javadoc 2.0 Demo Java Doc |
To implement a spliterator an extending class need only implement tryAdvance. The extending class should override forEachRemaining if it can provide a more performant implementation.
Nested Class Summary |
Nested classes/interfaces inherited from interface java.util.Spliterator |
Field Summary |
Fields inherited from interface java.util.Spliterator |
Constructor Summary |
||
protected |
AbstractDoubleSpliterator(long est, int additionalCharacteristics)
Creates a spliterator reporting the given estimated size and
characteristics.
|
Method Summary |
||
int |
Returns a set of characteristics of this Spliterator and its
elements.
|
|
long |
Returns an estimate of the number of elements that would be
encountered by a Spliterator.forEachRemaining(Consumer) traversal, or returns Long.MAX_VALUE if infinite, unknown, or too expensive to compute.
|
|
trySplit()
If this spliterator can be partitioned, returns a Spliterator
covering elements, that will, upon return from this method, not
be covered by this Spliterator.
This implementation permits limited parallelism.
|
Methods inherited from class java.lang.Object |
Methods inherited from interface java.util.Spliterator.OfDouble |
Methods inherited from interface java.util.Spliterator |
protected AbstractDoubleSpliterator |
(long est, int additionalCharacteristics) |
public Spliterator.OfDouble trySplit |
() |
If this Spliterator is Spliterator.ORDERED, the returned Spliterator must cover a strict prefix of the elements.
Unless this Spliterator covers an infinite number of elements, repeated calls to trySplit() must eventually return null. Upon non-null return:
This method may return null for any reason, including emptiness, inability to split after traversal has commenced, data structure constraints, and efficiency considerations. This implementation permits limited parallelism.
public long estimateSize |
() |
If this Spliterator is Spliterator.SIZED and has not yet been partially traversed or split, or this Spliterator is Spliterator.SUBSIZED and has not yet been partially traversed, this estimate must be an accurate count of elements that would be encountered by a complete traversal. Otherwise, this estimate may be arbitrarily inaccurate, but must decrease as specified across invocations of Spliterator.trySplit().
public int characteristics |
() |
If a Spliterator reports an inconsistent set of characteristics (either those returned from a single invocation or across multiple invocations), no guarantees can be made about any computation using this Spliterator.
|
FlexDoc/Javadoc 2.0 Demo Java Doc |