SortedByKey

final implicit class SortedByKey[R, E, K, A](self: ZStream[R, E, (K, A)])

Provides extension methods for streams that are sorted by distinct keys.

class Object
trait Matchable
class Any

Value members

Concrete methods

def zipAllSortedByKey[R1 <: R, E1 >: E, B](that: => ZStream[R1, E1, (K, B)])(defaultLeft: => A, defaultRight: => B)(implicit ord: Ordering[K], trace: Trace): ZStream[R1, E1, (K, (A, B))]

Zips this stream that is sorted by distinct keys and the specified stream that is sorted by distinct keys to produce a new stream that is sorted by distinct keys. Combines values associated with each key into a tuple, using the specified values defaultLeft and defaultRight to fill in missing values.

Zips this stream that is sorted by distinct keys and the specified stream that is sorted by distinct keys to produce a new stream that is sorted by distinct keys. Combines values associated with each key into a tuple, using the specified values defaultLeft and defaultRight to fill in missing values.

This allows zipping potentially unbounded streams of data by key in constant space but the caller is responsible for ensuring that the streams are sorted by distinct keys.

def zipAllSortedByKeyLeft[R1 <: R, E1 >: E, B](that: => ZStream[R1, E1, (K, B)])(default: => A)(implicit ord: Ordering[K], trace: Trace): ZStream[R1, E1, (K, A)]

Zips this stream that is sorted by distinct keys and the specified stream that is sorted by distinct keys to produce a new stream that is sorted by distinct keys. Keeps only values from this stream, using the specified value default to fill in missing values.

Zips this stream that is sorted by distinct keys and the specified stream that is sorted by distinct keys to produce a new stream that is sorted by distinct keys. Keeps only values from this stream, using the specified value default to fill in missing values.

This allows zipping potentially unbounded streams of data by key in constant space but the caller is responsible for ensuring that the streams are sorted by distinct keys.

def zipAllSortedByKeyRight[R1 <: R, E1 >: E, B](that: => ZStream[R1, E1, (K, B)])(default: => B)(implicit ord: Ordering[K], trace: Trace): ZStream[R1, E1, (K, B)]

Zips this stream that is sorted by distinct keys and the specified stream that is sorted by distinct keys to produce a new stream that is sorted by distinct keys. Keeps only values from that stream, using the specified value default to fill in missing values.

Zips this stream that is sorted by distinct keys and the specified stream that is sorted by distinct keys to produce a new stream that is sorted by distinct keys. Keeps only values from that stream, using the specified value default to fill in missing values.

This allows zipping potentially unbounded streams of data by key in constant space but the caller is responsible for ensuring that the streams are sorted by distinct keys.

def zipAllSortedByKeyWith[R1 <: R, E1 >: E, B, C](that: => ZStream[R1, E1, (K, B)])(left: A => C, right: B => C)(both: (A, B) => C)(implicit ord: Ordering[K], trace: Trace): ZStream[R1, E1, (K, C)]

Zips this stream that is sorted by distinct keys and the specified stream that is sorted by distinct keys to produce a new stream that is sorted by distinct keys. Uses the functions left, right, and both to handle the cases where a key and value exist in this stream, that stream, or both streams.

Zips this stream that is sorted by distinct keys and the specified stream that is sorted by distinct keys to produce a new stream that is sorted by distinct keys. Uses the functions left, right, and both to handle the cases where a key and value exist in this stream, that stream, or both streams.

This allows zipping potentially unbounded streams of data by key in constant space but the caller is responsible for ensuring that the streams are sorted by distinct keys.