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

pack-priv final Enum StreamShape

extends Enum<StreamShape>
Class Inheritance

An enum describing the known shape specializations for stream abstractions. Each will correspond to a specific subinterface of BaseStream (e.g., REFERENCE corresponds to Stream, INT_VALUE corresponds to IntStream). Each may also correspond to specializations of value-handling abstractions such as Spliterator, Consumer, etc.

API Note

This enum is used by implementations to determine compatibility between streams and operations (i.e., if the output shape of a stream is compatible with the input shape of the next operation).

Some APIs require you to specify both a generic type and a stream shape for input or output elements, such as TerminalOp which has both generic type parameters for its input types, and a getter for the input shape. When representing primitive streams in this way, the generic type parameter should correspond to the wrapper type for that primitive type.

Since
1.8

Field Summary

Modifier and TypeField and Description
public static final StreamShape
DOUBLE_VALUE

The shape specialization corresponding to DoubleStream and elements that are double values.

public static final StreamShape
INT_VALUE

The shape specialization corresponding to IntStream and elements that are int values.

public static final StreamShape
LONG_VALUE

The shape specialization corresponding to LongStream and elements that are long values.

public static final StreamShape
REFERENCE

The shape specialization corresponding to Stream and elements that are object references.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static StreamShape
public static StreamShape[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DOUBLE_VALUEback to summary
public static final StreamShape DOUBLE_VALUE

The shape specialization corresponding to DoubleStream and elements that are double values.

INT_VALUEback to summary
public static final StreamShape INT_VALUE

The shape specialization corresponding to IntStream and elements that are int values.

LONG_VALUEback to summary
public static final StreamShape LONG_VALUE

The shape specialization corresponding to LongStream and elements that are long values.

REFERENCEback to summary
public static final StreamShape REFERENCE

The shape specialization corresponding to Stream and elements that are object references.

Constructor Detail

StreamShapeback to summary
private StreamShape()

Method Detail

valueOfback to summary
public static StreamShape valueOf(String name)
valuesback to summary
public static StreamShape[] values()