447 |
|
for (int k = i + 1; k < len; ++k) newArray[k-1] = array_[k]; |
448 |
|
array_ = newArray; |
449 |
|
return true; |
450 |
< |
} |
451 |
< |
else |
450 |
> |
} else |
451 |
|
newArray[i] = array_[i]; |
452 |
|
} |
453 |
|
// special handling for last cell |
456 |
|
(element != null && element.equals(array_[newlen]))) { |
457 |
|
array_ = newArray; |
458 |
|
return true; |
459 |
< |
} |
461 |
< |
else |
459 |
> |
} else |
460 |
|
return false; // throw away copy |
461 |
|
|
462 |
|
} |
908 |
|
public E next() { |
909 |
|
try { |
910 |
|
return array[cursor++]; |
911 |
< |
} |
914 |
< |
catch (IndexOutOfBoundsException ex) { |
911 |
> |
} catch (IndexOutOfBoundsException ex) { |
912 |
|
throw new NoSuchElementException(); |
913 |
|
} |
914 |
|
} |