Here you can find the source of removeAll(List
Parameter | Description |
---|
public static <V> void removeAll(List<Integer> idxs, List<V> values)
//package com.java2s; //License from project: LGPL import java.util.List; public class Main { /** Removes all specified positions (which msut be given in ascending order) from the list. * @param <V>*///from w w w .j av a2 s . c o m public static <V> void removeAll(List<Integer> idxs, List<V> values) { int removed = 0; for (int idx : idxs) { values.remove(idx - removed); removed++; } } }