ArrayList
include capacity management and range checking.
Capacity There is no speed advantage to pre-allocating array sizes in
JavaScript, so this implementation does not include any of the capacity and
"growth increment" concepts in the standard ArrayList class. Although
ArrayList(int)
accepts a value for the intitial capacity of
the array, this constructor simply delegates to ArrayList()
.
It is only present for compatibility with JDK 1.4's API.
Dual endedness For increased performance, this implementation supports constant time insertion and deletion from either end.
ArrayList() | |
ArrayList(Collection) | |
ArrayList(int) | There is no speed advantage to pre-allocating array sizes in JavaScript,
so the intialCapacity parameter is ignored. |