ImmutableIntArray

class ImmutableIntArray(numbers: Int) : Iterable<Int>

Immutable alternative of IntArray

Can not be modified -- if needed, use copyArray to create a mutable IntArray copy.

Constructors

ImmutableIntArray
Link copied to clipboard
fun ImmutableIntArray(size: Int, generator: (Int) -> Int)
ImmutableIntArray
Link copied to clipboard
fun ImmutableIntArray(vararg numbers: Int)

Functions

contentEquals
Link copied to clipboard
infix fun contentEquals(other: ImmutableIntArray?): Boolean
copyArray
Link copied to clipboard
fun copyArray(): IntArray
copyInto
Link copied to clipboard
fun copyInto(destination: IntArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): IntArray
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
forEach
Link copied to clipboard
open fun forEach(p0: Consumer<in Int>)
get
Link copied to clipboard
operator fun get(index: Int): Int
hashCode
Link copied to clipboard
open override fun hashCode(): Int
iterator
Link copied to clipboard
open operator override fun iterator(): Iterator<Int>
joinToString
Link copied to clipboard
fun joinToString(separator: CharSequence = ", ", prefix: CharSequence = "", postfix: CharSequence = "", limit: Int = -1, truncated: CharSequence = "...", transform: (Int) -> CharSequence? = null): String
spliterator
Link copied to clipboard
open fun spliterator(): Spliterator<Int>

Properties

size
Link copied to clipboard
val size: Int