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 |
|
|
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); |
356 |
|
} |
357 |
|
} |
358 |
|
|
359 |
< |
public final void remove() { |
359 |
> |
public void remove() { |
360 |
|
if (lastRet == -1) |
361 |
|
throw new IllegalStateException(); |
362 |
|
if (expectedModCount != modCount) |
372 |
|
} |
373 |
|
} |
374 |
|
} |
375 |
< |
|
376 |
< |
private final class ListItr extends Itr implements ListIterator<E> { |
375 |
> |
|
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() { |