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

Comparing jsr166/src/main/java/util/AbstractList.java (file contents):
Revision 1.1 by dl, Sun Nov 27 14:54:23 2005 UTC vs.
Revision 1.5 by jsr166, Mon Dec 5 02:56:59 2005 UTC

# Line 1 | Line 1
1   /*
2 < * @(#)AbstractList.java        1.48 05/08/27
2 > * %W% %E%
3   *
4 < * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
4 > * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5   * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6   */
7  
# Line 337 | Line 337 | public abstract class AbstractList<E> ex
337           */
338          int expectedModCount = modCount;
339  
340 <        public final boolean hasNext() {
341 <            return cursor < size();
340 >        public boolean hasNext() {
341 >            return cursor != size();
342          }
343  
344 <        public final E next() {
344 >        public E next() {
345              try {
346                  int i = cursor;
347                  E next = get(i);
# Line 356 | Line 356 | public abstract class AbstractList<E> ex
356              }
357          }
358  
359 <        public final void remove() {
359 >        public void remove() {
360              if (lastRet == -1)
361                  throw new IllegalStateException();
362              if (expectedModCount != modCount)
# Line 373 | Line 373 | public abstract class AbstractList<E> ex
373          }
374      }
375      
376 <    private final class ListItr extends Itr implements ListIterator<E> {
376 >    private class ListItr extends Itr implements ListIterator<E> {
377          ListItr(int index) {
378              cursor = index;
379          }
380  
381          public boolean hasPrevious() {
382 <            return cursor > 0;
382 >            return cursor != 0;
383          }
384  
385          public int nextIndex() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines