auto
inline fun <T : Any> auto(type: KClass<T>, size: Int, initializer: (Int) -> T): Buffer<T>
Content copied to clipboard
Creates a Buffer of given type. If the type is primitive, specialized buffers are used (IntBuffer, DoubleBuffer, etc.), ListBuffer is returned otherwise.
The size is specified, and each element is calculated by calling the specified initializer function.
Creates a Buffer of given type T. If the type is primitive, specialized buffers are used (IntBuffer, DoubleBuffer, etc.), ListBuffer is returned otherwise.
The size is specified, and each element is calculated by calling the specified initializer function.