A List is an ordered Collection (sometimes called a sequence). Lists may contain duplicate elements.
Positional access — manipulates elements based on their numerical position in the list:
E get(int index); E set(int index, E element); //optional boolean add(E element); //optional void add(int index, E element); //optional E remove(int index); //optional boolean addAll(int index, Collection<? extends E> c); //optional
Search — searches for a specified object in the list and returns its numerical position:
int indexOf(Object o); int lastIndexOf(Object o);
Range-view — performs arbitrary range operations on the list.:
List<E> subList(int from, int to);
Iteration — extends Iterator semantics to take advantage of the list's sequential nature :
ListIterator<E> listIterator(); ListIterator<E> listIterator(int index);
sort — sorts a List using a merge sort algorithm, which provides a fast, stable sort. (A stable sort is one that does not reorder equal elements.)
shuffle — randomly permutes the elements in a List
reverse — reverses the order of the elements in a List.
rotate — rotates all the elements in a List by a specified distance
swap — swaps the elements at specified positions in a List
replaceAll — replaces all occurrences of one specified value with another
fill — overwrites every element in a List with the specified value
copy — copies the source List into the destination List
binarySearch — searches for an element in an ordered List using the binary search algorithm.
indexOfSubList — returns the index of the first sublist of one List that is equal to another.
lastIndexOfSubList — returns the index of the last sublist of one List that is equal to another
Copyright © 1998-2009 Dilvan Moreira