<init>
For Common, JS
Creates a new empty ArrayList with the specified initial capacity.
Capacity is the maximum number of elements the list is able to store in current backing storage. When the list gets full and a new element can't be added, its capacity is expanded, which usually leads to creation of a bigger backing storage.
Parameters
initialCapacity
- the initial capacity of the created list.
Note that the argument is just a hint for the implementation and can be ignored.
Exceptions
IllegalArgumentException
- if initialCapacity is negative.
For Native
Creates a new empty ArrayList with the specified initial capacity.
Capacity is the maximum number of elements the list is able to store in current backing storage. When the list gets full and a new element can't be added, its capacity is expanded, which usually leads to creation of a bigger backing storage.
Parameters
initialCapacity
- the initial capacity of the created list.
Note that the argument is just a hint for the implementation and can be ignored.
Exceptions
IllegalArgumentException
- if initialCapacity is negative.
<init>(elements: Collection<E>)
Creates a new ArrayList filled with the elements of the specified collection.
The iteration order of elements in the created list is the same as in the specified collection.