public boolean addAll(Collection<? extends E> c) { return addAll(size, c); }
public E get(int index) { rangeCheck(index); checkForComodification(); return l.get(index + offset); }
public int size() { checkForComodification(); return size; }
@Override public C.List<T> subList(int fromIndex, int toIndex) { if (fromIndex == toIndex) { return Nil.list(); } if (is(C.Feature.RANDOM_ACCESS)) { return new RandomAccessSubList<T>(this, fromIndex, toIndex); } else { return new SubList<T>(this, fromIndex, toIndex); } }
public Iterator<E> iterator() { return listIterator(); }
public int size() { checkForComodification(); return size; }
@Override public C.List<T> subList(int fromIndex, int toIndex) { if (fromIndex == toIndex) { return Nil.list(); } if (is(C.Feature.RANDOM_ACCESS)) { return new RandomAccessSubList<T>(this, fromIndex, toIndex); } else { return new SubList<T>(this, fromIndex, toIndex); } }
public Iterator<E> iterator() { return listIterator(); }
public E set(int index, E element) { rangeCheck(index); checkForComodification(); return l.set(index + offset, element); }
public boolean addAll(int index, Collection<? extends E> c) { if (index < 0 || index > size) throw new IndexOutOfBoundsException( "Index: " + index + ", Size: " + size); int cSize = c.size(); if (cSize == 0) return false; checkForComodification(); l.addAll(offset + index, c); expectedModCount = l.modCount(); size += cSize; modCount++; return true; }
public boolean addAll(Collection<? extends E> c) { return addAll(size, c); }
public E set(int index, E element) { rangeCheck(index); checkForComodification(); return l.set(index + offset, element); }
public void add(int index, E element) { if (index < 0 || index > size) throw new IndexOutOfBoundsException(); checkForComodification(); l.add(index + offset, element); expectedModCount = l.modCount(); size++; modCount++; }
public E get(int index) { rangeCheck(index); checkForComodification(); return l.get(index + offset); }
public void add(int index, E element) { if (index < 0 || index > size) throw new IndexOutOfBoundsException(); checkForComodification(); l.add(index + offset, element); expectedModCount = l.modCount(); size++; modCount++; }
public E remove(int index) { rangeCheck(index); checkForComodification(); E result = l.remove(index + offset); expectedModCount = l.modCount(); size--; modCount++; return result; }
public boolean addAll(int index, Collection<? extends E> c) { if (index < 0 || index > size) throw new IndexOutOfBoundsException( "Index: " + index + ", Size: " + size); int cSize = c.size(); if (cSize == 0) return false; checkForComodification(); l.addAll(offset + index, c); expectedModCount = l.modCount(); size += cSize; modCount++; return true; }
public E remove(int index) { rangeCheck(index); checkForComodification(); E result = l.remove(index + offset); expectedModCount = l.modCount(); size--; modCount++; return result; }