APIdia Launch Partner
Top Description Inners Fields Constructors Methods
java.util.stream

pack-priv final Class Nodes

extends Object
Class Inheritance
Imports
jdk.internal.util.ArraysSupport, java.util.ArrayDeque, .Arrays, .Collection, .Deque, .Objects, .Spliterator, .Spliterators, java.util.concurrent.CountedCompleter, java.util.function.BinaryOperator, .Consumer, .DoubleConsumer, .IntConsumer, .IntFunction, .LongConsumer, .LongFunction

Factory methods for constructing implementations of Node and Node.Builder and their primitive specializations. Fork/Join tasks for collecting output from a PipelineHelper to a Node and flattening Nodes.
Since
1.8

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract static class
Nodes.AbstractConcNode<T, T_NODE extends Node<T>>

Node class for an internal node with two or more children

private static class
Nodes.ArrayNode<T>

Node class for a reference array

private static class
Nodes.CollectionNode<T>

Node class for a Collection

private static class
Nodes.CollectorTask<P_IN, P_OUT, T_NODE extends Node<P_OUT>, T_BUILDER extends Node.Builder<P_OUT>>

pack-priv static class
private static class
private static class
private static class
private abstract static class
Nodes.EmptyNode<T, T_ARR, T_CONS>

private static class
Nodes.FixedNodeBuilder<T>

Fixed-sized builder class for reference nodes

private static class
private abstract static class
Nodes.InternalNodeSpliterator<T, S extends Spliterator<T>, N extends Node<T>>

Abstract class for spliterator for all internal node classes

private static class
private static class
private static class
private static class
private static class
private abstract static class
Nodes.SizedCollectorTask<P_IN, P_OUT, T_SINK extends Sink<P_OUT>, K extends Nodes.SizedCollectorTask<P_IN, P_OUT, T_SINK, K>>

private static class
Nodes.SpinedNodeBuilder<T>

Variable-sized builder class for reference nodes

private abstract static class
Nodes.ToArrayTask<T, T_NODE extends Node<T>, K extends Nodes.ToArrayTask<T, T_NODE, K>>

Field Summary

Modifier and TypeField and Description
pack-priv static final String
private static final double[]
private static final Node.OfDouble
private static final int[]
private static final Node.OfInt
private static final long[]
private static final Node.OfLong
private static final Node<T>
pack-priv static final long
MAX_ARRAY_SIZE

The maximum size of an array that can be allocated.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static <
the type of elements of the node builder
T
>
Node.Builder<T>

Returns:

a Node.Builder
builder
(long
-1 if a variable size builder is requested, otherwise the exact capacity desired. A fixed capacity builder will fail if the wrong number of elements are added to the builder.
exactSizeIfKnown
,
IntFunction<T[]>
the array factory
generator
)

Produces a Node.Builder.

pack-priv static <
the type of elements of the node builder
T
>
Node.Builder<T>

Returns:

a Node.Builder
builder
()

Produces a variable size Node.Builder.

pack-priv static <T> IntFunction<T[]>
castingArray()

Returns: an array generator for an array whose elements are of type T.

public static <P_IN, P_OUT> Node<P_OUT>

Returns:

a Node describing the output elements
collect
(PipelineHelper<P_OUT>
the pipeline helper describing the pipeline
helper
,
Spliterator<P_IN> spliterator, boolean
whether a conc node should be flattened into a node describing an array before returning
flattenTree
,
IntFunction<P_OUT[]>
the array generator
generator
)

Collect, in parallel, elements output from a pipeline and describe those elements with a Node.

public static <
the type of elements from the source Spliterator
P_IN
>
Node.OfDouble

Returns:

a Node.OfDouble describing the output elements
collectDouble
(PipelineHelper<Double>
the pipeline helper describing the pipeline
helper
,
Spliterator<P_IN> spliterator, boolean
whether a conc node should be flattened into a node describing an array before returning
flattenTree
)

Collect, in parallel, elements output from n double-valued pipeline and describe those elements with a Node.OfDouble.

public static <
the type of elements from the source Spliterator
P_IN
>
Node.OfInt

Returns:

a Node.OfInt describing the output elements
collectInt
(PipelineHelper<Integer>
the pipeline helper describing the pipeline
helper
,
Spliterator<P_IN> spliterator, boolean
whether a conc node should be flattened into a node describing an array before returning
flattenTree
)

Collect, in parallel, elements output from an int-valued pipeline and describe those elements with a Node.OfInt.

public static <
the type of elements from the source Spliterator
P_IN
>
Node.OfLong

Returns:

a Node.OfLong describing the output elements
collectLong
(PipelineHelper<Long>
the pipeline helper describing the pipeline
helper
,
Spliterator<P_IN> spliterator, boolean
whether a conc node should be flattened into a node describing an array before returning
flattenTree
)

Collect, in parallel, elements output from a long-valued pipeline and describe those elements with a Node.OfLong.

pack-priv static <
the type of elements of the concatenated node
T
>
Node<T>

Returns:

a Node covering the elements of the input nodes
conc
(StreamShape
the shape of the concatenated node to be created
shape
,
Node<T>
the left input node
left
,
Node<T>
the right input node
right
)

Produces a concatenated Node that has two or more children.

pack-priv static Node.Builder.OfDouble

Returns:

a Node.Builder.OfDouble
doubleBuilder
(long
-1 if a variable size builder is requested, otherwise the exact capacity desired. A fixed capacity builder will fail if the wrong number of elements are added to the builder.
exactSizeIfKnown
)

Produces a Node.Builder.OfDouble.

pack-priv static Node.Builder.OfDouble

Returns:

a Node.Builder.OfDouble
doubleBuilder
()

Produces a variable size Node.Builder.OfDouble.

pack-priv static <
the type of elements of the created node
T
>
Node<T>

Returns:

an empty node.
emptyNode
(StreamShape
the shape of the node to be created
shape
)

Produces an empty node whose count is zero, has no children and no content.

public static <
type of elements contained by the node
T
>
Node<T>

Returns:

a flat Node
flatten
(Node<T>
the node to flatten
node
,
IntFunction<T[]>
the array factory used to create array instances
generator
)

Flatten, in parallel, a Node.

public static Node.OfDouble

Returns:

a flat Node.OfDouble
flattenDouble
(Node.OfDouble
the node to flatten
node
)

Flatten, in parallel, a Node.OfDouble.

public static Node.OfInt

Returns:

a flat Node.OfInt
flattenInt
(Node.OfInt
the node to flatten
node
)

Flatten, in parallel, a Node.OfInt.

public static Node.OfLong

Returns:

a flat Node.OfLong
flattenLong
(Node.OfLong
the node to flatten
node
)

Flatten, in parallel, a Node.OfLong.

pack-priv static Node.Builder.OfInt

Returns:

a Node.Builder.OfInt
intBuilder
(long
-1 if a variable size builder is requested, otherwise the exact capacity desired. A fixed capacity builder will fail if the wrong number of elements are added to the builder.
exactSizeIfKnown
)

Produces a Node.Builder.OfInt.

pack-priv static Node.Builder.OfInt

Returns:

a Node.Builder.OfInt
intBuilder
()

Produces a variable size Node.Builder.OfInt.

pack-priv static Node.Builder.OfLong

Returns:

a Node.Builder.OfLong
longBuilder
(long
-1 if a variable size builder is requested, otherwise the exact capacity desired. A fixed capacity builder will fail if the wrong number of elements are added to the builder.
exactSizeIfKnown
)

Produces a Node.Builder.OfLong.

pack-priv static Node.Builder.OfLong

Returns:

a Node.Builder.OfLong
longBuilder
()

Produces a variable size Node.Builder.OfLong.

pack-priv static <
the type of elements held by the node
T
>
Node<T>

Returns:

a node holding an array
node
(T[]
the array
array
)

Produces a Node describing an array.

pack-priv static <
the type of elements held by the node
T
>
Node<T>

Returns:

a node holding a collection
node
(Collection<T>
the collection
c
)

Produces a Node describing a Collection.

pack-priv static Node.OfInt

Returns:

a node holding an array
node
(int[]
the array
array
)

Produces a Node.OfInt describing an int[] array.

pack-priv static Node.OfLong

Returns:

a node holding an array
node
(final long[]
the array
array
)

Produces a Node.OfLong describing a long[] array.

pack-priv static Node.OfDouble

Returns:

a node holding an array
node
(final double[]
the array
array
)

Produces a Node.OfDouble describing a double[] array.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait