zip

infix fun <R> ByteBuffer.zip(other: Array<out R>): List<Pair<Byte, R>>
infix fun <R> ShortBuffer.zip(other: Array<out R>): List<Pair<Short, R>>
infix fun <R> IntBuffer.zip(other: Array<out R>): List<Pair<Int, R>>
infix fun <R> LongBuffer.zip(other: Array<out R>): List<Pair<Long, R>>
infix fun <R> FloatBuffer.zip(other: Array<out R>): List<Pair<Float, R>>
infix fun <R> DoubleBuffer.zip(other: Array<out R>): List<Pair<Double, R>>
infix fun <R> CharBuffer.zip(other: Array<out R>): List<Pair<Char, R>>
infix fun ByteBuffer.zip(other: ByteArray): List<Pair<Byte, Byte>>
infix fun ShortBuffer.zip(other: ShortArray): List<Pair<Short, Short>>
infix fun IntBuffer.zip(other: IntArray): List<Pair<Int, Int>>
infix fun LongBuffer.zip(other: LongArray): List<Pair<Long, Long>>
infix fun FloatBuffer.zip(other: FloatArray): List<Pair<Float, Float>>
infix fun DoubleBuffer.zip(other: DoubleArray): List<Pair<Double, Double>>
infix fun CharBuffer.zip(other: CharArray): List<Pair<Char, Char>>
infix fun ByteBuffer.zip(other: ByteBuffer): List<Pair<Byte, Byte>>
infix fun ShortBuffer.zip(other: ShortBuffer): List<Pair<Short, Short>>
infix fun IntBuffer.zip(other: IntBuffer): List<Pair<Int, Int>>
infix fun LongBuffer.zip(other: LongBuffer): List<Pair<Long, Long>>
infix fun FloatBuffer.zip(other: FloatBuffer): List<Pair<Float, Float>>
infix fun DoubleBuffer.zip(other: DoubleBuffer): List<Pair<Double, Double>>
infix fun CharBuffer.zip(other: CharBuffer): List<Pair<Char, Char>>

Returns a list of pairs built from the elements of this array and the other array with the same index. The returned list has length of the shortest collection.

Samples

kool.buffers.Iterables.Operations.zipIterable
inline fun <R, V> ByteBuffer.zip(other: Array<out R>, transform: (a: Byte, R) -> V): List<V>
inline fun <R, V> ShortBuffer.zip(other: Array<out R>, transform: (a: Short, R) -> V): List<V>
inline fun <R, V> IntBuffer.zip(other: Array<out R>, transform: (a: Int, R) -> V): List<V>
inline fun <R, V> LongBuffer.zip(other: Array<out R>, transform: (a: Long, R) -> V): List<V>
inline fun <R, V> FloatBuffer.zip(other: Array<out R>, transform: (a: Float, R) -> V): List<V>
inline fun <R, V> DoubleBuffer.zip(other: Array<out R>, transform: (a: Double, R) -> V): List<V>
inline fun <R, V> CharBuffer.zip(other: Array<out R>, transform: (a: Char, R) -> V): List<V>

Returns a list of values built from the elements of this array and the other array with the same index using the provided transform function applied to each pair of elements. The returned list has length of the shortest collection.

Samples

kool.buffers.Iterables.Operations.zipIterableWithTransform
infix fun <R> ByteBuffer.zip(other: Iterable<R>): List<Pair<Byte, R>>
infix fun <R> ShortBuffer.zip(other: Iterable<R>): List<Pair<Short, R>>
infix fun <R> IntBuffer.zip(other: Iterable<R>): List<Pair<Int, R>>
infix fun <R> LongBuffer.zip(other: Iterable<R>): List<Pair<Long, R>>
infix fun <R> FloatBuffer.zip(other: Iterable<R>): List<Pair<Float, R>>
infix fun <R> DoubleBuffer.zip(other: Iterable<R>): List<Pair<Double, R>>
infix fun <R> CharBuffer.zip(other: Iterable<R>): List<Pair<Char, R>>

Returns a list of pairs built from the elements of this collection and other array with the same index. The returned list has length of the shortest collection.

Samples

kool.buffers.Iterables.Operations.zipIterable
inline fun <R, V> ByteBuffer.zip(other: Iterable<R>, transform: (a: Byte, R) -> V): List<V>
inline fun <R, V> ShortBuffer.zip(other: Iterable<R>, transform: (a: Short, R) -> V): List<V>
inline fun <R, V> IntBuffer.zip(other: Iterable<R>, transform: (a: Int, R) -> V): List<V>
inline fun <R, V> LongBuffer.zip(other: Iterable<R>, transform: (a: Long, R) -> V): List<V>
inline fun <R, V> FloatBuffer.zip(other: Iterable<R>, transform: (a: Float, R) -> V): List<V>
inline fun <R, V> DoubleBuffer.zip(other: Iterable<R>, transform: (a: Double, R) -> V): List<V>
inline fun <R, V> CharBuffer.zip(other: Iterable<R>, transform: (a: Char, R) -> V): List<V>

Returns a list of values built from the elements of this array and the other collection with the same index using the provided transform function applied to each pair of elements. The returned list has length of the shortest collection.

Samples

kool.buffers.Iterables.Operations.zipIterableWithTransform
inline fun <V> ByteBuffer.zip(other: ByteArray, transform: (a: Byte, b: Byte) -> V): List<V>
inline fun <V> ShortBuffer.zip(other: ShortArray, transform: (a: Short, b: Short) -> V): List<V>
inline fun <V> IntBuffer.zip(other: IntArray, transform: (a: Int, b: Int) -> V): List<V>
inline fun <V> LongBuffer.zip(other: LongArray, transform: (a: Long, b: Long) -> V): List<V>
inline fun <V> FloatBuffer.zip(other: FloatArray, transform: (a: Float, b: Float) -> V): List<V>
inline fun <V> DoubleBuffer.zip(other: DoubleArray, transform: (a: Double, b: Double) -> V): List<V>
inline fun <V> CharBuffer.zip(other: CharArray, transform: (a: Char, b: Char) -> V): List<V>
inline fun <V> ByteBuffer.zip(other: ByteBuffer, transform: (a: Byte, b: Byte) -> V): List<V>
inline fun <V> ShortBuffer.zip(other: ShortBuffer, transform: (a: Short, b: Short) -> V): List<V>
inline fun <V> IntBuffer.zip(other: IntBuffer, transform: (a: Int, b: Int) -> V): List<V>
inline fun <V> LongBuffer.zip(other: LongBuffer, transform: (a: Long, b: Long) -> V): List<V>
inline fun <V> FloatBuffer.zip(other: FloatBuffer, transform: (a: Float, b: Float) -> V): List<V>
inline fun <V> DoubleBuffer.zip(other: DoubleBuffer, transform: (a: Double, b: Double) -> V): List<V>
inline fun <V> CharBuffer.zip(other: CharBuffer, transform: (a: Char, b: Char) -> V): List<V>

Returns a list of values built from the elements of this array and the other array with the same index using the provided transform function applied to each pair of elements. The returned list has length of the shortest array.

Samples

kool.buffers.Iterables.Operations.zipIterableWithTransform