Companion

Functions

Link copied to clipboard
fun <InternalAccumulator, Value, Result> nonSuspendOf(supply: () -> InternalAccumulator, accumulate: (current: InternalAccumulator, value: Value) -> Unit, finish: (current: InternalAccumulator) -> Result, characteristics: Set<Characteristics> = setOf()): NonSuspendCollector<Value, Result>

Constructs a new Collector from its components

Link copied to clipboard
fun <InternalAccumulator, Value, Result> of(supply: suspend () -> InternalAccumulator, accumulate: suspend (current: InternalAccumulator, value: Value) -> Unit, finish: suspend (current: InternalAccumulator) -> Result, characteristics: Set<Characteristics> = setOf()): Collector<Value, Result>

Constructs a new Collector from its components