| Modifier and Type | Class and Description |
|---|---|
| private static class | SliceOps.
Input element type to the stream pipeline P_IN, Output element type from the stream pipeline P_OUT>
|
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static long | Returns: the sliced sizethe current size size, long the number of elements to skip, assumed to be >= 0 skip, long the number of elements to limit, assumed to be >= 0, with
a value of limit)Long.MAX_VALUE if there is no limitCalculates the sliced size given the current size, number of elements skip, and the number of elements to limit. |
| private static long | Returns: the slice fence.the number of elements to skip, assumed to be >= 0 skip, long the number of elements to limit, assumed to be >= 0, with
a value of limit)Long.MAX_VALUE if there is no limitCalculates the slice fence, which is one past the index of the slice range |
| private static int | |
| public static DoubleStream | makeDouble(AbstractPipeline<?, Double, ?>
A DoubleStream upstream, long The number of elements to skip. Must be >= 0. skip, long The maximum size of the resulting stream, or -1 if no limit
is to be imposed limit)Appends a "slice" operation to the provided DoubleStream. |
| public static IntStream | makeInt(AbstractPipeline<?, Integer, ?>
An IntStream upstream, long The number of elements to skip. Must be >= 0. skip, long The maximum size of the resulting stream, or -1 if no limit
is to be imposed limit)Appends a "slice" operation to the provided IntStream. |
| public static LongStream | makeLong(AbstractPipeline<?, Long, ?>
A LongStream upstream, long The number of elements to skip. Must be >= 0. skip, long The maximum size of the resulting stream, or -1 if no limit
is to be imposed limit)Appends a "slice" operation to the provided LongStream. |
| public static < the type of both input and output elements T> Stream | makeRef(AbstractPipeline<?, T, ?>
a reference stream with element type T upstream, long the number of elements to skip. Must be >= 0. skip, long the maximum size of the resulting stream, or -1 if no limit
is to be imposed limit)Appends a "slice" operation to the provided stream. |
| private static <P_IN> Spliterator | sliceSpliterator(StreamShape shape, Spliterator<P_IN> s, long skip, long limit)
Creates a slice spliterator given a stream shape governing the spliterator type. |
| SliceOps | back to summary |
|---|---|
| private SliceOps() | |
| calcSize | back to summary |
|---|---|
| private static long calcSize(long size, long skip, long limit) Calculates the sliced size given the current size, number of elements skip, and the number of elements to limit.
| |
| calcSliceFence | back to summary |
|---|---|
| private static long calcSliceFence(long skip, long limit) Calculates the slice fence, which is one past the index of the slice range
| |
| flags | back to summary |
|---|---|
| private static int flags(long limit) | |
| makeDouble | back to summary |
|---|---|
| public static DoubleStream makeDouble(AbstractPipeline<?, Double, ?> upstream, long skip, long limit) Appends a "slice" operation to the provided DoubleStream. The slice operation may be may be skip-only, limit-only, or skip-and-limit.
| |
| makeInt | back to summary |
|---|---|
| public static IntStream makeInt(AbstractPipeline<?, Integer, ?> upstream, long skip, long limit) Appends a "slice" operation to the provided IntStream. The slice operation may be may be skip-only, limit-only, or skip-and-limit.
| |
| makeLong | back to summary |
|---|---|
| public static LongStream makeLong(AbstractPipeline<?, Long, ?> upstream, long skip, long limit) Appends a "slice" operation to the provided LongStream. The slice operation may be may be skip-only, limit-only, or skip-and-limit.
| |
| makeRef | back to summary |
|---|---|
| public static <T> Stream Appends a "slice" operation to the provided stream. The slice operation may be may be skip-only, limit-only, or skip-and-limit.
| |
| sliceSpliterator | back to summary |
|---|---|
| private static <P_IN> Spliterator Creates a slice spliterator given a stream shape governing the spliterator type. Requires that the underlying Spliterator be SUBSIZED. | |
ForkJoinTask implementing slice computation.
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private final IntFunction | |
| private final AbstractPipeline | |
| private final long | |
| private final long | |
| private long |
| Access | Constructor and Description |
|---|---|
| pack-priv | SliceTask(AbstractPipeline<P_OUT, P_OUT, ?> op, PipelineHelper<P_OUT> helper, Spliterator<P_IN> spliterator, IntFunction<P_OUT[]> generator, long offset, long size)
|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| private long | Returns: the number of completed elementsthe target size target)Compute the number of completed elements in this node. |
| protected final Node | doLeaf()
Implements abstract java. Computes the result associated with a leaf node. |
| private Node | |
| protected final Node | getEmptyResult()
Implements abstract java. Returns the value indicating the computation completed with no task finding a short-circuitable result. |
| private boolean | Returns: true if the number of elements is greater than or equal to the target size, otherwise false.the target size target)Determine if the number of completed elements in this node and nodes to the left of this node is greater than or equal to the target size. |
| protected SliceOps. | makeChild(Spliterator<P_IN> spliterator)
Implements abstract java. Constructs a new node of type T whose parent is the receiver; must call the AbstractTask(T, Spliterator) constructor with the receiver and the provided Spliterator. |
| public final void | onCompletion(CountedCompleter<?> caller)
Overrides java. Performs an action when method |
| completed | back to summary |
|---|---|
| private volatile boolean completed | |
| generator | back to summary |
|---|---|
| private final IntFunction<P_OUT[]> generator | |
| op | back to summary |
|---|---|
| private final AbstractPipeline<P_OUT, P_OUT, ?> op | |
| targetOffset | back to summary |
|---|---|
| private final long targetOffset | |
| targetSize | back to summary |
|---|---|
| private final long targetSize | |
| thisNodeSize | back to summary |
|---|---|
| private long thisNodeSize | |
| SliceTask | back to summary |
|---|---|
| pack-priv SliceTask(AbstractPipeline<P_OUT, P_OUT, ?> op, PipelineHelper<P_OUT> helper, Spliterator<P_IN> spliterator, IntFunction<P_OUT[]> generator, long offset, long size) | |
| SliceTask | back to summary |
|---|---|
| pack-priv SliceTask(SliceOps. | |
| cancel | back to summary |
|---|---|
| protected void cancel() Overrides java. Doc from java. Mark this task as canceled
| |
| completedSize | back to summary |
|---|---|
| private long completedSize(long target) Compute the number of completed elements in this node. Computation terminates if all nodes have been processed or the number of completed elements is greater than or equal to the target size.
| |
| doLeaf | back to summary |
|---|---|
| protected final Node Implements abstract java. Doc from java. Computes the result associated with a leaf node. Will be called by
| |
| doTruncate | back to summary |
|---|---|
| private Node | |
| getEmptyResult | back to summary |
|---|---|
| protected final Node Implements abstract java. Doc from java. Returns the value indicating the computation completed with no task
finding a short-circuitable result. For example, for a "find" operation,
this might be null or an empty
| |
| isLeftCompleted | back to summary |
|---|---|
| private boolean isLeftCompleted(long target) Determine if the number of completed elements in this node and nodes to the left of this node is greater than or equal to the target size.
| |
| makeChild | back to summary |
|---|---|
| protected SliceOps. Implements abstract java. Doc from java. Constructs a new node of type T whose parent is the receiver; must call the AbstractTask(T, Spliterator) constructor with the receiver and the provided Spliterator.
| |
| onCompletion | back to summary |
|---|---|
| public final void onCompletion(CountedCompleter<?> caller) Overrides java. Doc from java. Performs an action when method
| |