ArrayList 中自带一个** removeRange(int formIndex, int toIndex) ** 不过是protected的。
示例代码
public class RangeArrayList extends ArrayList {
public void removeRange(int fromIndex, int toIndex) {
super.removeRange(fromIndex, toIndex);
}
}
继承ArrayList 重新removeRange 就可以了,使用方式与ArrayList一致。