Lines Matching defs:index

63  * <a href="{@docRoot}/../technotes/guides/collections/index.html">
117 abstract public E get(int index);
131 public E set(int index, E element) {
147 public void add(int index, E element) {
160 public E remove(int index) {
227 * index)} or {@code removeRange(int fromIndex, int toIndex)} is
256 public boolean addAll(int index, Collection<? extends E> c) {
257 rangeCheckForAdd(index);
260 add(index++, e);
324 public ListIterator<E> listIterator(final int index) {
325 rangeCheckForAdd(index);
327 return new ListItr(index);
391 ListItr(int index) {
392 cursor = index;
464 * after bounds-checking the index and adjusting for the offset. The
478 * @throws IndexOutOfBoundsException if an endpoint index value is out of range
546 * Removes from this list all of the elements whose index is between
548 * Shifts any succeeding elements to the left (reduces their index).
564 * @param fromIndex index of first element to be removed
565 * @param toIndex index after last element to be removed
603 private void rangeCheckForAdd(int index) {
604 if (index < 0 || index > size())
605 throw new IndexOutOfBoundsException(outOfBoundsMsg(index));
608 private String outOfBoundsMsg(int index) {
609 return "Index: "+index+", Size: "+size();
632 public E set(int index, E element) {
633 rangeCheck(index);
635 return l.set(index+offset, element);
638 public E get(int index) {
639 rangeCheck(index);
641 return l.get(index+offset);
649 public void add(int index, E element) {
650 rangeCheckForAdd(index);
652 l.add(index+offset, element);
657 public E remove(int index) {
658 rangeCheck(index);
660 E result = l.remove(index+offset);
677 public boolean addAll(int index, Collection<? extends E> c) {
678 rangeCheckForAdd(index);
684 l.addAll(offset+index, c);
694 public ListIterator<E> listIterator(final int index) {
696 rangeCheckForAdd(index);
699 private final ListIterator<E> i = l.listIterator(index+offset);
753 private void rangeCheck(int index) {
754 if (index < 0 || index >= size)
755 throw new IndexOutOfBoundsException(outOfBoundsMsg(index));
758 private void rangeCheckForAdd(int index) {
759 if (index < 0 || index > size)
760 throw new IndexOutOfBoundsException(outOfBoundsMsg(index));
763 private String outOfBoundsMsg(int index) {
764 return "Index: "+index+", Size: "+size;