Package org.moeaframework.analysis.stream
package org.moeaframework.analysis.stream
Streaming API for manipulating and analyzing data.
This package provides several data structures for streams, including:
DataStream
- A stream of values,Partition
- A stream of key-value pairs, andGroups
- A stream of keys mapped to a collection of values.
Groupings
and aggregating data using
Measures
. While these methods are intended to be used with the data structures, they may also be used
directly on the underlying stream.
This API is inspired by Java's Stream
API, and uses it under the covers, with a few
modifications:
- Unlike Java streams, multiple operations are permitted on the same data stream. This is allowed since intermediate results are materialized after each operation, at the cost of performance.
- The original data source can be modified after constructing a data stream, again because intermediate results are materialized.
- Parallel streams are not supported, since this library is not designed to be thread-safe.
-
ClassDescriptionDataStream<V>A stream of values.Collection of grouping functions, to be used with
DataStream.groupBy(Function)
orPartition.groupBy(Function)
.Groups<G,K, V> Groups items together using a "grouping key".A data stream storing the intermediate, materialized content of the stream.ImmutablePartition<K,V> A partition storing the intermediate, materialized content of the stream.Standard collection of measurement functions.Partition<K,V> A stream of key-value pairs.Streamable<V>Interface for classes that support data streams.