Package-level declarations

Types

Link copied to clipboard

A LinkedList-based stream that can be appended to

Link copied to clipboard
class ArrayStream<T>(array: Array<T>) : Stream<T>

Create a stream from an array

Link copied to clipboard
class FlatStream<T>(stream: Stream<out Stream<T>>) : Stream<T>

A stream that flattens a stream of streams

Link copied to clipboard
class IndexedMapStream<T, R>(stream: Stream<T>, mapper: (Int, T) -> R) : Stream<R>
Link copied to clipboard
class IteratorStream<T>(iterator: Iterator<T>) : Stream<T>

Create a stream from an iterator

Link copied to clipboard
class ListStream<T>(list: List<T>) : Stream<T>

Create a stream from a list The stream internally uses the list's iterator (because, depending on the list's implementation, there might be performance gains over using the list's get method)

Link copied to clipboard
class MapStream<T, R>(stream: Stream<T>, mapper: (T) -> R) : Stream<R>

Map a stream to another stream

Link copied to clipboard
class SequenceStream<T>(sequence: Sequence<T>) : Stream<T>

Create a stream from a sequence

Link copied to clipboard
interface Stream<T>

A stream is a sequence of elements that can be read one by one

Functions

Link copied to clipboard
fun <T> Stream<out Stream<T>>.flatten(): FlatStream<T>
Link copied to clipboard

Create a Stream from an Array

Create a Stream from an Iterator

fun <T> List<T>.stream(): ListStream<T>

Create a Stream from a List

Create a Stream from a Sequence

Link copied to clipboard
fun <T> streamOf(vararg elements: T): IteratorStream<T>

Create a Stream from a Sequence