auto

inline fun <T : Any> auto(type: KClass<T>, size: Int, initializer: (Int) -> T): Buffer<T>(source)

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.


inline fun <T : Any> auto(size: Int, initializer: (Int) -> T): Buffer<T>(source)

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.