ConstantChain

class ConstantChain<out T>(value: T) : Chain<T>

A chain that repeats the same value

Constructors

Link copied to clipboard
fun <out T> ConstantChain(value: T)

Functions

Link copied to clipboard
open suspend override fun collect(collector: FlowCollector<T>)
Link copied to clipboard
open suspend override fun fork(): Chain<T>

Create a copy of current chain state. Consuming resulting chain does not affect initial chain.

Link copied to clipboard
open suspend override fun next(): T

Generate next value, changing state if needed

Properties

Link copied to clipboard
val value: T

Sources

Link copied to clipboard