1088 |
|
public boolean hasNext() { |
1089 |
|
// Racy but within spec, since modifications are checked |
1090 |
|
// within or after synchronization in next/previous |
1091 |
< |
return cursor < Vector.this.elementCount; |
1091 |
> |
return cursor != elementCount; |
1092 |
|
} |
1093 |
|
|
1094 |
|
public boolean hasPrevious() { |
1095 |
< |
return cursor > 0; |
1095 |
> |
return cursor != 0; |
1096 |
|
} |
1097 |
|
|
1098 |
|
public int nextIndex() { |
1117 |
|
throw new ConcurrentModificationException(); |
1118 |
|
} |
1119 |
|
} |
1120 |
< |
public E previous() { |
1120 |
> |
|
1121 |
> |
public E previous() { |
1122 |
|
try { |
1123 |
|
int i = cursor - 1; |
1124 |
|
E prev = get(i); |
1144 |
|
cursor--; |
1145 |
|
lastRet = -1; |
1146 |
|
expectedModCount = modCount; |
1147 |
< |
} catch (IndexOutOfBoundsException e) { |
1147 |
> |
} catch (IndexOutOfBoundsException ex) { |
1148 |
|
throw new ConcurrentModificationException(); |
1149 |
|
} |
1150 |
|
} |