MutableBuffer

interface MutableBuffer<T> : Buffer<T>

A generic mutable random-access structure for both primitives and objects.

Parameters

T

the type of elements contained in the buffer.

Types

Companion
Link copied to clipboard
common
object Companion

Functions

contentEquals
Link copied to clipboard
common
open fun contentEquals(other: Buffer<*>): Boolean
Checks content equality with another buffer.
copy
Link copied to clipboard
common
abstract fun copy(): MutableBuffer<T>
Returns a shallow copy of the buffer.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
get
Link copied to clipboard
common
abstract operator fun get(index: Int): T
Gets element at given index.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
iterator
Link copied to clipboard
common
abstract operator fun iterator(): Iterator<T>
Iterates over all elements.
set
Link copied to clipboard
common
abstract operator fun set(index: Int, value: T)
Sets the array element at the specified index to the specified value.
toString
Link copied to clipboard
common
open fun toString(): String

Properties

size
Link copied to clipboard
common
abstract val size: Int
The size of this buffer.

Inheritors

MutableListBuffer
Link copied to clipboard
ArrayBuffer
Link copied to clipboard
FloatBuffer
Link copied to clipboard
IntBuffer
Link copied to clipboard
LongBuffer
Link copied to clipboard
MutableMemoryBuffer
Link copied to clipboard
RealBuffer
Link copied to clipboard
ShortBuffer
Link copied to clipboard

Extensions

array
Link copied to clipboard
common
val MutableBuffer<out Float>.array: FloatArray
Returns a FloatArray containing all of the elements of this MutableBuffer.
val MutableBuffer<out Int>.array: IntArray
Returns a IntArray containing all of the elements of this MutableBuffer.
val MutableBuffer<out Long>.array: LongArray
Returns a IntArray containing all of the elements of this MutableBuffer.
val MutableBuffer<out Double>.array: DoubleArray
Returns a DoubleArray containing all of the elements of this MutableBuffer.
val MutableBuffer<out Short>.array: ShortArray
Returns a ShortArray containing all of the elements of this MutableBuffer.