Method Description

void add(int index, E e)

boolean addAll

(int index, Collection<?

E get(int index)

int indexOf (Object o)

Insert element e into this list at position index. Shift the element currently at this position (if any) and any subsequent elements to the right. This method throws UnsupportedOperationException when this list does not support add(), ClassCastException when e's class is inappropriate for this list, IllegalArgumentException when some property of e prevents it from being added to this list, NullPointerException when e contains the null reference and this list does not support null elements, and java.lang.IndexOutOfBoundsException when index is less than 0 or index is greater than size().

Insert all of c's elements into this list starting at position index. Shift the element currently at this position (if any) and any subsequent elements to the right. The new elements appear in this list in the order in which they are returned by c's iterator. This method throws UnsupportedOperationException when this list does not support addAll(), ClassCastException when the class of one of c's elements is inappropriate for this list, IllegalArgumentException when some property of an element prevents it from being added to this list, NullPointerException when c contains the null reference or when one of its elements is null and this list does not support null elements, and IndexOutOfBoundsException when index is less than 0 or index is greater than size().

Return the element stored in this list at position index. This method throws IndexOutOfBoundsException when index is less than 0 or index is greater than or equal to size().

Return the index of the first occurrence of element o in this list, or -1 when this list does not contain the element. This method throws ClassCastException when o's class is inappropriate for this list, and NullPointerException when o contains the null reference and this list does not support null elements.

Method

Was this article helpful?

0 0

Post a comment