Buffer
A generic read-only random-access structure for both primitives and objects.
Buffer is in general identity-free. Buffer.contentEquals should be used for content equality checks.
Parameters
the type of elements contained in the buffer.
Types
Functions
Properties
Inheritors
Extensions
Return a new array filled with buffer indices. Indices order is defined by sorting associated buffer value. This feature allows sorting buffer values without reordering its content.
Create a new buffer from this one with the given mapping function and using Buffer.Companion.auto buffer factory.
Create a new buffer from this one with the given mapping function. Provided bufferFactory is used to construct the new buffer.
Create a new buffer from this one with the given indexed mapping function. Provided BufferFactory is used to construct the new buffer.
Checks that the Buffer is sorted (ascending) and throws IllegalArgumentException if it is not.
Create a zero-copy virtual buffer that contains the same elements but in descending order
Returns a new DoubleArray containing all the elements of this Buffer.
Returns a new FloatArray containing all the elements of this Buffer.
Returns a new MutableList filled with all elements of this buffer. NOTE: this method uses a protective copy, so it should not be used in performance-critical code.
Returns a new ShortArray containing all the elements of this Buffer.
Returns a new Array containing all elements of this buffer. NOTE: this method uses a protective copy, so it should not be used in performance-critical code.
The negation of this element.
Zip two buffers using given transform.