ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/CopyOnWriteArrayList.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/CopyOnWriteArrayList.java (file contents):
Revision 1.79 by jsr166, Wed Jun 8 03:51:46 2011 UTC vs.
Revision 1.80 by jsr166, Wed Jun 8 03:55:19 2011 UTC

# Line 1245 | Line 1245 | public class CopyOnWriteArrayList<E>
1245  
1246  
1247      private static class COWSubListIterator<E> implements ListIterator<E> {
1248 <        private final ListIterator<E> i;
1248 >        private final ListIterator<E> it;
1249          private final int offset;
1250          private final int size;
1251  
1252          COWSubListIterator(List<E> l, int index, int offset, int size) {
1253              this.offset = offset;
1254              this.size = size;
1255 <            i = l.listIterator(index+offset);
1255 >            it = l.listIterator(index+offset);
1256          }
1257  
1258          public boolean hasNext() {
# Line 1261 | Line 1261 | public class CopyOnWriteArrayList<E>
1261  
1262          public E next() {
1263              if (hasNext())
1264 <                return i.next();
1264 >                return it.next();
1265              else
1266                  throw new NoSuchElementException();
1267          }
# Line 1272 | Line 1272 | public class CopyOnWriteArrayList<E>
1272  
1273          public E previous() {
1274              if (hasPrevious())
1275 <                return i.previous();
1275 >                return it.previous();
1276              else
1277                  throw new NoSuchElementException();
1278          }
1279  
1280          public int nextIndex() {
1281 <            return i.nextIndex() - offset;
1281 >            return it.nextIndex() - offset;
1282          }
1283  
1284          public int previousIndex() {
1285 <            return i.previousIndex() - offset;
1285 >            return it.previousIndex() - offset;
1286          }
1287  
1288          public void remove() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines