net.rim.device.api.collection
Interface WritableList

All Superinterfaces:
Collection
All Known Subinterfaces:
List
All Known Implementing Classes:
SparseList

public interface WritableList
extends Collection

Provides array-like write access to a collection of object elements.


Method Summary
 void add(Object element)
          Adds an element to the end of this list.
 void insertAt(int index, Object element)
          Inserts element at index.
 void remove(Object element)
          Removes element.
 void removeAll()
          Removes all elements from the collection.
 void removeAt(int index)
          Removes element by index.
 



Method Detail

add

void add(Object element)
Adds an element to the end of this list.

Parameters:
element - Element to add.

insertAt

void insertAt(int index,
              Object element)
Inserts element at index.

If you specify an index that's greater than or equal to the size of the list, then this method adds the element to the end of the list.

Parameters:
index - Index that new element should have.
element - Element to insert.

removeAt

void removeAt(int index)
Removes element by index.

Parameters:
index - Index of the element to remove.

remove

void remove(Object element)
Removes element.

Note: this operation may be linear with respect to the number of elements in the list.

Parameters:
element - Element to remove.

removeAll

void removeAll()
Removes all elements from the collection.






Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.