Class ArrayList

public class ArrayList
extends AbstractList
implements List, Cloneable, RandomAccess
See Sun's JDK 1.4 documentation for documentation.

This implementation differs from JDK 1.4 ArrayList in terms of capacity management. 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.

Constructors

ArrayList()
ArrayList(Collection)
ArrayList(int)There is no speed advantage to pre-allocating array sizes in JavaScript, so the intialCapacity parameter is ignored.

Methods

add(int, Object)
add(Object)
addAll(Collection)
clear()
clone()
contains(Object)
get(int)
indexOf(Object)
indexOf(Object, int)
isEmpty()
lastIndexOf(Object)
lastIndexOf(Object, int)
remove(int)
remove(Object)
removeRange(int, int)
set(int, Object)
setSize(int)This function sets the size of the array, and is used by Vector.
size()
toArray(Object[])