ArrayList
Object Hierarchy:
Description:
public class ArrayList<G> :
AbstractList<
G?>
Resizable array implementation of the List interface.
The storage array grows automatically when needed.
This implementation is pretty good for rarely modified data. Because they are stored in an array this structure does not fit for highly
mutable data. For an alternative implementation see LinkedList.
See also:
LinkedList
Namespace: Gee
Package: gee-1.0
Content:
Creation methods:
Properties:
Methods:
-
public override
Iterator<G?>
iterator ()
Returns a Iterator that can be used for
simple iteration over a collection.
-
public override
ListIterator<G?>
list_iterator ()
Returns a ListIterator that can be used for iteration over this list.
-
public override bool
contains (G? item)
Determines whether this collection contains the specified item.
-
public override int
index_of (G? item)
Returns the index of the first occurence of the specified item in this list.
-
public override G?
get (int index)
Returns the item at the specified index in this list.
-
public override void
set (int index,
G? item)
Sets the item at the specified index in this list.
-
public override bool
add (G? item)
Adds an item to this collection. Must not be called on read-only collections.
-
public override void
insert (int index,
G? item)
Inserts an item into this list at the specified position.
-
public override bool
remove (G? item)
Removes the first occurence of an item from this collection. Must not be called on read-only
collections.
-
public override G?
remove_at (int index)
Removes the item at the specified index of this list.
-
public override void
clear ()
Removes all items from this collection. Must not be called on read-only collections.
-
public override
List<G?>?
slice (int start,
int stop)
Returns a slice of this list.
-
public override bool
add_all (
Collection<G?>
collection)
Adds all items in the input collection to this collection.