last

fun ByteBuffer.last(): Byte
fun ShortBuffer.last(): Short
fun IntBuffer.last(): Int
fun LongBuffer.last(): Long
fun FloatBuffer.last(): Float
fun DoubleBuffer.last(): Double
fun CharBuffer.last(): Char

Returns the last element.

Throws

if the buffer is empty.

inline fun ByteBuffer.last(predicate: (Byte) -> Boolean): Byte
inline fun ShortBuffer.last(predicate: (Short) -> Boolean): Short
inline fun IntBuffer.last(predicate: (Int) -> Boolean): Int
inline fun LongBuffer.last(predicate: (Long) -> Boolean): Long
inline fun FloatBuffer.last(predicate: (Float) -> Boolean): Float
inline fun DoubleBuffer.last(predicate: (Double) -> Boolean): Double
inline fun CharBuffer.last(predicate: (Char) -> Boolean): Char

Returns the last element matching the given predicate.

Throws

if no such element is found.