ConstantChain

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

A chain that repeats the same value

Constructors

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

Functions

collect
Link copied to clipboard
common
open suspend override fun collect(collector: FlowCollector<T>)
fork
Link copied to clipboard
common
open suspend override fun fork(): Chain<T>
Create a copy of current chain state.
next
Link copied to clipboard
common
open suspend override fun next(): T
Generate next value, changing state if needed

Properties

value
Link copied to clipboard
common
val value: T

Sources

common source
Link copied to clipboard