equal
deleted
inserted
replaced
890 |
890 |
891 private class SubList extends AbstractList<E> implements RandomAccess { |
891 private class SubList extends AbstractList<E> implements RandomAccess { |
892 private final AbstractList<E> parent; |
892 private final AbstractList<E> parent; |
893 private final int parentOffset; |
893 private final int parentOffset; |
894 private final int offset; |
894 private final int offset; |
895 private int size; |
895 int size; |
896 |
896 |
897 SubList(AbstractList<E> parent, |
897 SubList(AbstractList<E> parent, |
898 int offset, int fromIndex, int toIndex) { |
898 int offset, int fromIndex, int toIndex) { |
899 this.parent = parent; |
899 this.parent = parent; |
900 this.parentOffset = fromIndex; |
900 this.parentOffset = fromIndex; |
969 } |
969 } |
970 |
970 |
971 public ListIterator<E> listIterator(final int index) { |
971 public ListIterator<E> listIterator(final int index) { |
972 checkForComodification(); |
972 checkForComodification(); |
973 rangeCheckForAdd(index); |
973 rangeCheckForAdd(index); |
|
974 final int offset = this.offset; |
974 |
975 |
975 return new ListIterator<E>() { |
976 return new ListIterator<E>() { |
976 int cursor = index; |
977 int cursor = index; |
977 int lastRet = -1; |
978 int lastRet = -1; |
978 int expectedModCount = ArrayList.this.modCount; |
979 int expectedModCount = ArrayList.this.modCount; |