MutableListBuffer

value class MutableListBuffer<T>(list: MutableList<T>) : MutableBuffer<T>

MutableBuffer implementation over MutableList.

Parameters

T

the type of elements contained in the buffer.

Constructors

MutableListBuffer
Link copied to clipboard
common
fun <T> MutableListBuffer(size: Int, initializer: (Int) -> T)
MutableListBuffer
Link copied to clipboard
common
fun <T> MutableListBuffer(list: MutableList<T>)
the type of elements contained in the buffer.

Functions

copy
Link copied to clipboard
common
open override fun copy(): MutableBuffer<T>
Returns a shallow copy of the buffer.
get
Link copied to clipboard
common
open operator override fun get(index: Int): T
Gets element at given index.
iterator
Link copied to clipboard
common
open operator override fun iterator(): Iterator<T>
Iterates over all elements.
set
Link copied to clipboard
common
open operator override fun set(index: Int, value: T)
Sets the array element at the specified index to the specified value.

Properties

list
Link copied to clipboard
common
val list: MutableList<T>
The underlying list.
size
Link copied to clipboard
common
open override val size: Int
The size of this buffer.

Sources

common source
Link copied to clipboard