auto
inline fun <T : Any> auto(type: KClass<out T>, size: Int, initializer: (Int) -> T): MutableBuffer<T>
Content copied to clipboard
Creates a MutableBuffer 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.
inline fun <T : Any> auto(size: Int, initializer: (Int) -> T): MutableBuffer<T>
Content copied to clipboard
Creates a MutableBuffer 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.