fill

fun fill(a: ByteArray, fromIndex: Int, toIndex: Int, value: Byte)
fun fill(a: ShortArray, fromIndex: Int, toIndex: Int, value: Short)
fun fill(a: IntArray, fromIndex: Int, toIndex: Int, value: Int)
fun fill(a: LongArray, fromIndex: Int, toIndex: Int, value: Long)
fun <T> fill(a: Array<T?>, fromIndex: Int, toIndex: Int, value: T?)
fun fill(a: Array<IntArray>, frontIndex: Int, toIndex: Int, value: IntArray)
fun fill(a: Array<ByteArray?>, fromIndex: Int, toIndex: Int, value: ByteArray?)
fun fill(a: ByteArray, value: Byte)
fun fill(a: ShortArray, value: Short)
fun fill(a: IntArray, value: Int)
fun fill(a: LongArray, value: Long)
fun fill(a: FloatArray, value: Float)
fun fill(a: DoubleArray, value: Double)
fun fill(a: CharArray, value: Char)
fun <T> fill(a: Array<T>, value: T)


fun fill(a: FloatArray, fromIndex: Int, toIndex: Int, value: Float)

Assigns the specified float value to each element of the specified range of the specified array of floats. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)

Parameters

a

the array to be filled

fromIndex

the index of the first element (inclusive) to be filled with the specified value

toIndex

the index of the last element (exclusive) to be filled with the specified value

value

the value to be stored in all elements of the array

Throws

if fromIndex > toIndex

ArrayIndexOutOfBoundsException

if fromIndex < 0 or toIndex > a.length