chrriis.uihierarchy.compatibility
Interface List

All Superinterfaces:
Collection
All Known Implementing Classes:
ArrayList

public interface List
extends Collection

The interface of the list types of collections.

Version:
1.0 2004.01.11
Author:
Christopher Deckers (chrriis@brainlex.com)

Method Summary
 void add(int index, Object element)
          Inserts the specified element at the specified position in this list (optional operation).
 Object get(int index)
          Returns the element at the specified position in this list.
 int indexOf(Object o)
          Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.
 Object remove(int index)
          Removes the element at the specified position in this list (optional operation).
 Object set(int index, Object element)
          Replaces the element at the specified position in this list with the specified element (optional operation).
 
Methods inherited from interface chrriis.uihierarchy.compatibility.Collection
add, addAll, contains, isEmpty, remove, removeAll, size, toArray, toArray
 

Method Detail

get

public Object get(int index)
Returns the element at the specified position in this list.

Parameters:
index - The index.
Returns:
The element.

add

public void add(int index,
                Object element)
Inserts the specified element at the specified position in this list (optional operation).

Parameters:
index - The index.
element - The element.

remove

public Object remove(int index)
Removes the element at the specified position in this list (optional operation).

Parameters:
index - The index of the element to remove.
Returns:
The element that was removed.

set

public Object set(int index,
                  Object element)
Replaces the element at the specified position in this list with the specified element (optional operation).

Parameters:
index - The index at which to set the element.
element - The element to set.
Returns:
The element previously located at the specified position.

indexOf

public int indexOf(Object o)
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.

Parameters:
o - The element to look for.
Returns:
The index.