Interface Streamable<V>
- Type Parameters:
V
- the type of each value in the stream
- All Known Implementing Classes:
ResultSeries
public interface Streamable<V>
Interface for classes that support data streams.
Classes are not necessarily required to implement this interface. They can alternatively extend one of the existing
data structures, such as DataStream
or Partition
directly, or use one of the static of(...)
methods in the aforementioned classes to convert a collection into a data stream.
-
Method Summary
Modifier and TypeMethodDescriptiondefault DataStream<V>
Returns aDataStream
with the values represented by this object.asPartition
(Function<V, K> key) Returns aPartition
with the values represented by this object.stream()
Returns a stream of values represented by this object.
-
Method Details
-
stream
Returns a stream of values represented by this object.- Returns:
- the stream of values
-
asDataStream
Returns aDataStream
with the values represented by this object.- Returns:
- the data stream
-
asPartition
Returns aPartition
with the values represented by this object.- Type Parameters:
K
- the type of the key- Parameters:
key
- a function returning the key for each value- Returns:
- the partition
-