telepath / com.github.giedomak.telepath.memorymanager.spliterator / FixedBatchSpliterator

FixedBatchSpliterator

class FixedBatchSpliterator<T> : FixedBatchSpliteratorBase<T> (source)

Constructors

<init>

FixedBatchSpliterator(spliterator: Spliterator<T>, batchSize: Int = 64, est: Long = spliterator.estimateSize())

Functions

forEachRemaining

fun forEachRemaining(action: Consumer<in T>): Unit

tryAdvance

fun tryAdvance(action: Consumer<in T>): Boolean

Inherited Functions

characteristics

open fun characteristics(): Int

estimateSize

open fun estimateSize(): Long

getComparator

open fun getComparator(): Comparator<in T>?

trySplit

open fun trySplit(): Spliterator<T>?

Companion Object Functions

batchedSpliterator

fun <T> batchedSpliterator(toWrap: Spliterator<T>, batchSize: Int): FixedBatchSpliterator<T>

withBatchSize

fun <T> withBatchSize(input: Stream<T>, batchSize: Int): Stream<T>