Constructs an empty list with the specified initial capacity.
Constructs an empty list with an initial capacity of ten.
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.
Appends the specified element to the end of this list.
Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
Removes all of the elements from this list. The list will be empty after this call returns.
Returns <tt>true</tt> if this list contains the specified element. More formally, returns <tt>true</tt> if and only if this list contains at least one element <tt>e</tt> such that <tt>(o==null ? e==null : o.equals(e))</tt>.
Returns the element at the specified position in this list.
Returns <tt>true</tt> if this list contains no elements.
Returns an iterator over the elements in this list in proper sequence.
Removes the first occurrence of the specified element from this list, if it is present. If the list does not contain the element, it is unchanged. More formally, removes the element with the lowest index <tt>i</tt> such that <tt>(o==null ? get(i)==null : o.equals(get(i)))</tt> (if such an element exists). Returns <tt>true</tt> if this list contained the specified element (or equivalently, if this list changed as a result of the call).
Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).
Removes from this list all of the elements whose index is between {@code fromIndex}, inclusive, and {@code toIndex}, exclusive. Shifts any succeeding elements to the left (reduces their index). This call shortens the list by {@code (toIndex - fromIndex)} elements. (If {@code toIndex==fromIndex}, this operation has no effect.)
Replaces the element at the specified position in this list with the specified element.
Returns the number of elements in this list.
Returns a view of the portion of this list between the specified {@code fromIndex}, inclusive, and {@code toIndex}, exclusive. (If {@code fromIndex} and {@code toIndex} are equal, the returned list is empty.) The returned list is backed by this list, so non-structural changes in the returned list are reflected in this list, and vice-versa. The returned list supports all of the optional list operations.
Returns an array containing all of the elements in this list in proper sequence (from first to last element).