mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Fix AbstractList.removeRange
This commit is contained in:
parent
7511eea1cb
commit
2eea5cba5e
|
@ -18,11 +18,6 @@ package org.teavm.classlib.java.util;
|
|||
import org.teavm.classlib.java.lang.*;
|
||||
import org.teavm.interop.Rename;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Alexey Andreev
|
||||
* @param <E>
|
||||
*/
|
||||
public abstract class TAbstractList<E> extends TAbstractCollection<E> implements TList<E> {
|
||||
protected transient int modCount;
|
||||
|
||||
|
@ -155,8 +150,11 @@ public abstract class TAbstractList<E> extends TAbstractCollection<E> implements
|
|||
}
|
||||
|
||||
protected void removeRange(int start, int end) {
|
||||
for (int i = start; i < end; i++) {
|
||||
remove(i);
|
||||
TListIterator<E> iterator = listIterator(start);
|
||||
int sz = end - start;
|
||||
for (int i = 0; i < sz; i++) {
|
||||
iterator.next();
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user