Package-level declarations

Types

Link copied to clipboard
abstract class BaseItems<out T, out I : BaseItems<T, I>> : Items<T>

Items 的基础抽象类。

Link copied to clipboard

使用 List 作为数据来源实现 Items 的基础约定。

Link copied to clipboard
class FlowItems<T>(produceScope: CoroutineScope, flowFactory: (Items.PreprocessingProperties) -> Flow<T>) : BaseItems<T, FlowItems<T>>

使用 Flow 实现 Items 的基本约定。

Link copied to clipboard
interface Items<out T>

Items 是一个数据预处理序列,类似于 java.util.stream.Streamkotlinx.coroutines.flow.Flow, 但是不完全相同。

Link copied to clipboard

使用 Sequence 实现 Items 的基本约定。

Link copied to clipboard

Items 的基础实现,通过一个构建 ChannelIterator 的函数实现 Items 约定的功能。

Link copied to clipboard

Items 的基础阻塞实现,通过提供 Iterator 的工厂函数实现 Items 的基本约定。

Link copied to clipboard
class SingleValueItems<T>(value: T) : Items<T>

只有一个元素的 Items 实例。

Link copied to clipboard

使用 Stream 实现 Items 的基本约定。

Link copied to clipboard
class TransformItems<B, T>(baseItems: Items<B>, transform: suspend (B) -> T) : Items<T>

允许为一个 Items 提供一个转化函数的 Items 代理实现。

Functions

Link copied to clipboard

构建一个flow,并将当前 Items.PreprocessingProperties 作用于最终的 Flow 中。

Link copied to clipboard
inline fun <T> CoroutineScope.effectedFlowItems(crossinline block: suspend FlowCollector<T>.() -> Unit): Items<T>

以构建 Flow 的方式构建 Items.

Link copied to clipboard
inline fun <T> CoroutineScope.effectedItemsByFlow(crossinline flowFactory: () -> Flow<T>): Items<T>

提供 CoroutineScope 和构建 Flow 的函数 flowFactory 来构建 Items.

Link copied to clipboard
inline fun <T> effectedItemsBySequence(crossinline sequenceFactory: () -> Sequence<T>): Items<T>

提供构建 Sequence 的函数 sequenceFactory 来构建 Items.

Link copied to clipboard

构建一个sequence,并将当前 Items.PreprocessingProperties 作用于最终的 Sequence 中。

Link copied to clipboard
inline fun <T> effectedSequenceItems(crossinline block: suspend SequenceScope<T>.() -> Unit): Items<T>

以构建 Sequence 的方式构建 Items.

Link copied to clipboard
inline fun <T> CoroutineScope.flowItems(crossinline block: suspend FlowCollector<T>.(Items.PreprocessingProperties) -> Unit): Items<T>

以构建 Flow 的方式构建 Items.

Link copied to clipboard

提供构建 ChannelIterator 的函数来构建一个 Items.

Link copied to clipboard
inline fun <T> CoroutineScope.itemsByFlow(crossinline flowFactory: (Items.PreprocessingProperties) -> Flow<T>): Items<T>

提供 CoroutineScope 和构建 Flow 的函数 flowFactory 来构建 Items.

Link copied to clipboard
inline fun <T> itemsBySequence(crossinline sequenceFactory: (Items.PreprocessingProperties) -> Sequence<T>): Items<T>

提供构建 Sequence 的函数 sequenceFactory 来构建 Items.

Link copied to clipboard
inline fun <B, T> Items<B>.map(crossinline transform: suspend (B) -> T): Items<T>

转化一个 Items 中的元素类型并得到新的 Items 实例。

Link copied to clipboard
inline fun <T> CoroutineScope.produceItems(context: CoroutineContext = EmptyCoroutineContext, capacity: Int = 0, crossinline block: suspend ProducerScope<T>.(Items.PreprocessingProperties) -> Unit): Items<T>

通过 produce 构建 ChannelIterator 来得到一个 Items 实例。

Link copied to clipboard
inline fun <T> sequenceItems(crossinline block: suspend SequenceScope<T>.(Items.PreprocessingProperties) -> Unit): Items<T>

以构建 Sequence 的方式构建 Items.

Link copied to clipboard
inline suspend fun <T, C : MutableCollection<T>> Items<T>.toCollection(collection: C): C

Items 中的元素收集为目标集合 C.

Link copied to clipboard
inline suspend fun <T> Items<T>.toList(): List<T>

Items 中的元素收集为 List.

Link copied to clipboard
fun <B, T> Items<B>.transform(transform: suspend (B) -> T): Items<T>

转化一个 Items 中的元素类型并得到新的 Items 实例。

Link copied to clipboard
fun <T> Items<T>.withLimiter(limiter: Limiter): Items<T>

通过 LimiterItems 的预处理参数进行处理。