@Override public List<E> subList(int fromIndex, int toIndex) { if (fromIndex < 0 || fromIndex > toIndex) { throw indexOutOfBoundsException(fromIndex); } if (toIndex > elements.length) { throw indexOutOfBoundsException(toIndex); } if (fromIndex == toIndex) { return Collections.emptyList(); } return new ImmutableArrayList<E>(Arrays.copyOfRange(this.elements, fromIndex, toIndex)); }
@Override public List<E> subList(int fromIndex, int toIndex) { if (fromIndex < 0 || fromIndex > toIndex) { throw indexOutOfBoundsException(fromIndex); } if (toIndex > elements.length) { throw indexOutOfBoundsException(toIndex); } if (fromIndex == toIndex) { return Collections.emptyList(); } return new ImmutableArrayList<E>(Arrays.copyOfRange(this.elements, fromIndex, toIndex)); }
@Override public List<E> subList(int fromIndex, int toIndex) { if (fromIndex < 0 || fromIndex > toIndex) { throw indexOutOfBoundsException(fromIndex); } if (toIndex > elements.length) { throw indexOutOfBoundsException(toIndex); } if (fromIndex == toIndex) { return Collections.emptyList(); } return new ImmutableArrayList<E>(Arrays.copyOfRange(this.elements, fromIndex, toIndex)); }
@Override public List<E> subList(int fromIndex, int toIndex) { if (fromIndex < 0 || fromIndex > toIndex) { throw indexOutOfBoundsException(fromIndex); } if (toIndex > elements.length) { throw indexOutOfBoundsException(toIndex); } if (fromIndex == toIndex) { return Collections.emptyList(); } return new ImmutableArrayList<E>(Arrays.copyOfRange(this.elements, fromIndex, toIndex)); }
@Override public List<E> subList(int fromIndex, int toIndex) { if (fromIndex < 0 || fromIndex > toIndex) { throw indexOutOfBoundsException(fromIndex); } if (toIndex > elements.length) { throw indexOutOfBoundsException(toIndex); } if (fromIndex == toIndex) { return Collections.emptyList(); } return new ImmutableArrayList<E>(Arrays.copyOfRange(this.elements, fromIndex, toIndex)); }
@Override public List<E> subList(int fromIndex, int toIndex) { if (fromIndex < 0 || fromIndex > toIndex) { throw indexOutOfBoundsException(fromIndex); } if (toIndex > elements.length) { throw indexOutOfBoundsException(toIndex); } if (fromIndex == toIndex) { return Collections.emptyList(); } return new ImmutableArrayList<E>(Arrays.copyOfRange(this.elements, fromIndex, toIndex)); }
@Override @SuppressWarnings("unchecked") public E get(int index) { if (index < 0 || index >= size()) { throw indexOutOfBoundsException(index); } return (E) elements[index]; }
@Override public ListIterator<E> listIterator(int index) { if (index < 0 || index > elements.length) { throw indexOutOfBoundsException(index); } return new ListIteratorImpl(index); }
@Override @SuppressWarnings("unchecked") public E get(int index) { if (index < 0 || index >= size()) { throw indexOutOfBoundsException(index); } return (E) elements[index]; }
@Override @SuppressWarnings("unchecked") public E get(int index) { if (index < 0 || index >= size()) { throw indexOutOfBoundsException(index); } return (E) elements[index]; }
@Override public ListIterator<E> listIterator(int index) { if (index < 0 || index > elements.length) { throw indexOutOfBoundsException(index); } return new ListIteratorImpl(index); }
@Override @SuppressWarnings("unchecked") public E get(int index) { if (index < 0 || index >= size()) { throw indexOutOfBoundsException(index); } return (E) elements[index]; }
@Override @SuppressWarnings("unchecked") public E get(int index) { if (index < 0 || index >= size()) { throw indexOutOfBoundsException(index); } return (E) elements[index]; }
@Override public ListIterator<E> listIterator(int index) { if (index < 0 || index > elements.length) { throw indexOutOfBoundsException(index); } return new ListIteratorImpl(index); }
@Override public ListIterator<E> listIterator(int index) { if (index < 0 || index > elements.length) { throw indexOutOfBoundsException(index); } return new ListIteratorImpl(index); }
@Override public ListIterator<E> listIterator(int index) { if (index < 0 || index > elements.length) { throw indexOutOfBoundsException(index); } return new ListIteratorImpl(index); }
@Override @SuppressWarnings("unchecked") public E get(int index) { if (index < 0 || index >= size()) { throw indexOutOfBoundsException(index); } return (E) elements[index]; }
@Override public ListIterator<E> listIterator(int index) { if (index < 0 || index > elements.length) { throw indexOutOfBoundsException(index); } return new ListIteratorImpl(index); }