Methods Summary |
---|
public void | add(int location, E object)
listIterator(location).add(object);
|
public boolean | addAll(int location, java.util.Collection collection)
ListIterator<E> it = listIterator(location);
Iterator<? extends E> colIt = collection.iterator();
// BEGIN android-removed
// int next = it.nextIndex();
// while (colIt.hasNext()) {
// it.add(colIt.next());
// it.previous();
// }
// return next != it.nextIndex();
// END android-removed
// BEGIN android-added
// BUG: previous/next inconsistant. We care for list
// modification NOT iterator modification.
int size = this.size();
while (colIt.hasNext()) {
it.add(colIt.next());
}
return size != this.size();
// END android-added
|
public E | get(int location)
try {
return listIterator(location).next();
} catch (NoSuchElementException e) {
throw new IndexOutOfBoundsException();
}
|
public java.util.Iterator | iterator()
return listIterator(0);
|
public abstract java.util.ListIterator | listIterator(int location)
|
public E | remove(int location)
try {
ListIterator<E> it = listIterator(location);
E result = it.next();
it.remove();
return result;
} catch (NoSuchElementException e) {
throw new IndexOutOfBoundsException();
}
|
public E | set(int location, E object)
ListIterator<E> it = listIterator(location);
E result = it.next();
it.set(object);
return result;
|