libperun

Class std.cont.ArrayList

Synopsis

public  class ArrayList< T > extends List< T >

A list implemented as an array. Element access is O(1), but additions, removals and insertions are O(n).

Fields

Constructors

public ArrayList();

Construct an empty list.

public ArrayList(int capacity);

Construct an empty list, with the specified initial capacity.

public ArrayList(Iterator< T > source);

Construct a list from the given iterator. The new list will include everything from the current position of the iterator, to its end. The iterator will be shifted by this constructor!

public ArrayList(T[] array);

Constuct a list from members of the specified array. The array itself is left unmodified.

Methods

public Iterator< T > iterate();

No description given

protected T get(int index);

No description given

protected void set(int index,T value);

No description given

public void append(T value);

No description given

public void remove(int index);

No description given

public void insert(int index,T value);

No description given

public int size();

No description given