ReadOnlyBuffer

value class ReadOnlyBuffer<T>(buffer: MutableBuffer<T>) : Buffer<T>

Immutable wrapper for MutableBuffer.

Parameters

T

the type of elements contained in the buffer.

Constructors

Link copied to clipboard
fun <T> ReadOnlyBuffer(buffer: MutableBuffer<T>)

Functions

Link copied to clipboard
open operator override fun get(index: Int): T

Gets element at given index.

Link copied to clipboard
open operator override fun iterator(): Iterator<T>

Iterates over all elements.

Properties

Link copied to clipboard
val buffer: MutableBuffer<T>

The underlying buffer.

Link copied to clipboard
open override val size: Int

The size of this buffer.

Sources

Link copied to clipboard