set

abstract operator fun set(index: Int, element: T): T(source)

Replaces the element at index without changing the list's size.

Invalid indexes are rejected by the implementation; ArrayList throws IllegalArgumentException.

Return

the previous element at index.

Parameters

index

zero-based element index, less than size.

element

replacement element.