Methods Summary |
---|
public void | add(int location, E object)Inserts the specified object into this {@code List} at the specified location.
The object is inserted before the current element at the specified
location. If the location is equal to the size of this {@code List}, the object
is added at the end. If the location is smaller than the size of this
{@code List}, then all elements beyond the specified location are moved by one
position towards the end of the {@code List}.
|
public boolean | add(E object)Adds the specified object at the end of this {@code List}.
|
public boolean | addAll(int location, java.util.Collection collection)Inserts the objects in the specified collection at the specified location
in this {@code List}. The objects are added in the order they are returned from
the collection's iterator.
|
public boolean | addAll(java.util.Collection collection)Adds the objects in the specified collection to the end of this {@code List}. The
objects are added in the order in which they are returned from the
collection's iterator.
|
public void | clear()Removes all elements from this {@code List}, leaving it empty.
|
public boolean | contains(java.lang.Object object)Tests whether this {@code List} contains the specified object.
|
public boolean | containsAll(java.util.Collection collection)Tests whether this {@code List} contains all objects contained in the
specified collection.
|
public boolean | equals(java.lang.Object object)Compares the given object with the {@code List}, and returns true if they
represent the same object using a class specific comparison. For
{@code List}s, this means that they contain the same elements in exactly the same
order.
|
public E | get(int location)Returns the element at the specified location in this {@code List}.
|
public int | hashCode()Returns the hash code for this {@code List}. It is calculated by taking each
element' hashcode and its position in the {@code List} into account.
|
public int | indexOf(java.lang.Object object)Searches this {@code List} for the specified object and returns the index of the
first occurrence.
|
public boolean | isEmpty()Returns whether this {@code List} contains no elements.
|
public java.util.Iterator | iterator()Returns an iterator on the elements of this {@code List}. The elements are
iterated in the same order as they occur in the {@code List}.
|
public int | lastIndexOf(java.lang.Object object)Searches this {@code List} for the specified object and returns the index of the
last occurrence.
|
public java.util.ListIterator | listIterator()Returns a {@code List} iterator on the elements of this {@code List}. The elements are
iterated in the same order that they occur in the {@code List}.
|
public java.util.ListIterator | listIterator(int location)Returns a list iterator on the elements of this {@code List}. The elements are
iterated in the same order as they occur in the {@code List}. The iteration
starts at the specified location.
|
public E | remove(int location)Removes the object at the specified location from this {@code List}.
|
public boolean | remove(java.lang.Object object)Removes the first occurrence of the specified object from this {@code List}.
|
public boolean | removeAll(java.util.Collection collection)Removes all occurrences in this {@code List} of each object in the specified
collection.
|
public boolean | retainAll(java.util.Collection collection)Removes all objects from this {@code List} that are not contained in the
specified collection.
|
public E | set(int location, E object)Replaces the element at the specified location in this {@code List} with the
specified object. This operation does not change the size of the {@code List}.
|
public int | size()Returns the number of elements in this {@code List}.
|
public java.util.List | subList(int start, int end)Returns a {@code List} of the specified portion of this {@code List} from the given start
index to the end index minus one. The returned {@code List} is backed by this
{@code List} so changes to it are reflected by the other.
|
public java.lang.Object[] | toArray()Returns an array containing all elements contained in this {@code List}.
|
public T[] | toArray(T[] array)Returns an array containing all elements contained in this {@code List}. If the
specified array is large enough to hold the elements, the specified array
is used, otherwise an array of the same type is created. If the specified
array is used and is larger than this {@code List}, the array element following
the collection elements is set to null.
|