onEachIndexed
inline fun ByteBuffer.onEachIndexed(action: (index: Int, Byte) -> Unit): ByteBuffer
Content copied to clipboard
inline fun ShortBuffer.onEachIndexed(action: (index: Int, Short) -> Unit): ShortBuffer
Content copied to clipboard
inline fun IntBuffer.onEachIndexed(action: (index: Int, Int) -> Unit): IntBuffer
Content copied to clipboard
inline fun LongBuffer.onEachIndexed(action: (index: Int, Long) -> Unit): LongBuffer
Content copied to clipboard
inline fun FloatBuffer.onEachIndexed(action: (index: Int, Float) -> Unit): FloatBuffer
Content copied to clipboard
inline fun DoubleBuffer.onEachIndexed(action: (index: Int, Double) -> Unit): DoubleBuffer
Content copied to clipboard
inline fun CharBuffer.onEachIndexed(action: (index: Int, Char) -> Unit): CharBuffer
Content copied to clipboard
Performs the given action on each element, providing sequential index with the element, and returns the array itself afterwards.
Parameters
action
function that takes the index of an element and the element itself and performs the action on the element.