public static interface Node.OfLong extends Node.OfPrimitive<Long,LongConsumer,long[],Spliterator.OfLong,Node.OfLong>
Node
for long elementsNode.Builder<T>, Node.OfDouble, Node.OfInt, Node.OfLong, Node.OfPrimitive<T,T_CONS,T_ARR,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>,T_NODE extends Node.OfPrimitive<T,T_CONS,T_ARR,T_SPLITR,T_NODE>>
Modifier and Type | Method and Description |
---|---|
default void |
copyInto(Long[] boxed,
int offset)
Copies the content of this
Node into an array, starting at a
given offset into the array. |
default void |
forEach(Consumer<? super Long> consumer)
Traverses the elements of this node, and invoke the provided
Consumer with each element. |
default StreamShape |
getShape()
Gets the
StreamShape associated with this Node . |
default long[] |
newArray(int count)
Creates a new primitive array.
|
default Node.OfLong |
truncate(long from,
long to,
IntFunction<Long[]> generator)
Return a node describing a subsequence of the elements of this node,
starting at the given inclusive start offset and ending at the given
exclusive end offset.
|
asArray, asPrimitiveArray, copyInto, forEach, getChild, spliterator
count, getChildCount
default void forEach(Consumer<? super Long> consumer)
Consumer
with each element. Elements are provided in encounter
order if the source for the Node
has a defined encounter order.default void copyInto(Long[] boxed, int offset)
Node
into an array, starting at a
given offset into the array. It is the caller's responsibility to ensure
there is sufficient room in the array, otherwise unspecified behaviour
will occur if the array length is less than the number of elements
contained in this node.default Node.OfLong truncate(long from, long to, IntFunction<Long[]> generator)
Node
truncate
in interface Node<Long>
truncate
in interface Node.OfPrimitive<Long,LongConsumer,long[],Spliterator.OfLong,Node.OfLong>
from
- The (inclusive) starting offset of elements to include, must
be in range 0..count().to
- The (exclusive) end offset of elements to include, must be
in range 0..count().generator
- A function to be used to create a new array, if needed,
for reference nodes.default long[] newArray(int count)
Node.OfPrimitive
newArray
in interface Node.OfPrimitive<Long,LongConsumer,long[],Spliterator.OfLong,Node.OfLong>
count
- the length of the primitive array.default StreamShape getShape()
StreamShape
associated with this Node
.