API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util. List View Source
Author(s)
Josh Bloch
Neal Gafter
Since
1.2
Version
1.49, 04/21/06
Serial
Hierarchy
 Iterable
      Collection
          List
Subinterfaces
Description
public interface List
  An ordered collection (also known as a sequence).
Methods
Hide/Show inherited methods
public boolean add ( E e) [Specified in Collection]
  Appends the specified element to the end of this list (optional operation).
public void add (int index, E element)
  Inserts the specified element at the specified position in this list (optional operation).
public boolean addAll (Collection<Object> c) [Specified in Collection]
  Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation).
public boolean addAll (int index, Collection<Object> c)
  Inserts all of the elements in the specified collection into this list at the specified position (optional operation).
public void clear () [Specified in Collection]
  Removes all of the elements from this list (optional operation).
public boolean contains (Object o) [Specified in Collection]
  Returns true if this list contains the specified element.
public boolean containsAll (Collection<Object> c) [Specified in Collection]
  Returns true if this list contains all of the elements of the specified collection.
public boolean equals (Object o) [Specified in Collection]
  Compares the specified object with this list for equality.
public E get (int index)
  Returns the element at the specified position in this list.
public int hashCode () [Specified in Collection]
  Returns the hash code value for this list.
public int indexOf (Object o)
  Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.
public boolean isEmpty () [Specified in Collection]
  Returns true if this list contains no elements.
public Iterator< E> iterator () [Specified in Collection]
  Returns an iterator over the elements in this list in proper sequence.
public int lastIndexOf (Object o)
  Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.
public ListIterator< E> listIterator ()
  Returns a list iterator over the elements in this list (in proper sequence).
public ListIterator< E> listIterator (int index)
  Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list.
public E remove (int index)
  Removes the element at the specified position in this list (optional operation).
public boolean remove (Object o) [Specified in Collection]
  Removes the first occurrence of the specified element from this list, if it is present (optional operation).
public boolean removeAll (Collection<Object> c) [Specified in Collection]
  Removes from this list all of its elements that are contained in the specified collection (optional operation).
public boolean retainAll (Collection<Object> c) [Specified in Collection]
  Retains only the elements in this list that are contained in the specified collection (optional operation).
public E set (int index, E element)
  Replaces the element at the specified position in this list with the specified element (optional operation).
public int size () [Specified in Collection]
  Returns the number of elements in this list.
public List< E> subList (int fromIndex, int toIndex)
  Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.
public Object toArray () [Specified in Collection]
  Returns an array containing all of the elements in this list in proper sequence (from first to last element).
public T toArray ( T a) [Specified in Collection]
  Returns an array containing all of the elements in this list in proper sequence (from first to last element); the runtime type of the returned array is that of the specified array.
Fields
Hide/Show inherited fields
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar