ListBuffer

class ListBuffer<T>(list: List<T>) : Buffer<T>

Buffer implementation over List.

Parameters

T

the type of elements contained in the buffer.

Constructors

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

Functions

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.
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

list
Link copied to clipboard
common
val list: List<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