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 Details

    • stream

      Stream<V> stream()
      Returns a stream of values represented by this object.
      Returns:
      the stream of values
    • asDataStream

      default DataStream<V> asDataStream()
      Returns a DataStream with the values represented by this object.
      Returns:
      the data stream
    • asPartition

      default <K> Partition<K,V> asPartition(Function<V,K> key)
      Returns a Partition 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