IntArrayList

class IntArrayList(val initialCapacity: Int)

An extendable array of primitive <code>int</code> values.

class Object
trait Matchable
class Any

Value members

Constructors

def this()

Constructs an empty list.

Constructs an empty list.

Concrete methods

def add(value: Int): Unit

Adds a value to the end of this list.

Adds a value to the end of this list.

Value Params
value

the value to add

def addAll(values: Array[Int]): Unit

Adds all values in an array to the end of this list.

Adds all values in an array to the end of this list.

Value Params
values

an array of values

def ensureCapacity(capacity: Int): Unit

Increases the capacity of this list instance, if necessary, to ensure that it can hold at least the number of elements specified by the capacity argument.

Increases the capacity of this list instance, if necessary, to ensure that it can hold at least the number of elements specified by the capacity argument.

Value Params
capacity

the desired capacity

def size: Int

Returns the number of values in this list.

Returns the number of values in this list.

return the number of values in the list

def toArray: Array[Int]

Returns a int array containing a copy of the values in this list.

Returns a int array containing a copy of the values in this list.

return an array containing the values in this list

Concrete fields

val initialCapacity: Int