filter Indexed
inline fun ByteBuffer.filterIndexed(predicate: (index: Int, Byte) -> Boolean): List<Byte>
Content copied to clipboard
inline fun ShortBuffer.filterIndexed(predicate: (index: Int, Short) -> Boolean): List<Short>
Content copied to clipboard
inline fun IntBuffer.filterIndexed(predicate: (index: Int, Int) -> Boolean): List<Int>
Content copied to clipboard
inline fun LongBuffer.filterIndexed(predicate: (index: Int, Long) -> Boolean): List<Long>
Content copied to clipboard
inline fun FloatBuffer.filterIndexed(predicate: (index: Int, Float) -> Boolean): List<Float>
Content copied to clipboard
inline fun DoubleBuffer.filterIndexed(predicate: (index: Int, Double) -> Boolean): List<Double>
Content copied to clipboard
inline fun CharBuffer.filterIndexed(predicate: (index: Int, Char) -> Boolean): List<Char>
Content copied to clipboard
Returns a list containing only elements matching the given predicate.
Samples
kool.buffers.Collections.Filtering.filterIndexed
Parameters
predicate
function that takes the index of an element and the element itself and returns the result of predicate evaluation on the element.