List of utility methods to do List Remove
E | remove(List Removes the element at the given index position of a given List instance. E retval = null; if (list != null && index >= 0 && list.size() > index) { retval = list.remove(index); return retval; |
E | remove(List Removes the item at the given index in the given list. if (list == null) throw new NullPointerException("list must not be null"); if (index < 0) index += list.size(); return list.remove(index); |
T | remove(List remove try { return list.remove(index); } catch (Throwable t) { return defaultValue; |
T | remove(List remove if (list.isEmpty()) { return null; return list.remove(position); |
T | remove(List Removes an item from a list and returns the collections instance of this item, or null if not found or the collection is empty/null. if (isEmpty(list)) return null; if (!list.contains(remove)) return null; T item = get(list, remove); list.remove(item); return item; |
boolean | remove(List remove if (list == null || value == null) { return false; for (T t : list) { if (t.hashCode() == value.hashCode()) { list.remove(t); return true; return false; |
List | remove(Object o, List oldList) remove List newList; if (oldList == null) { newList = new ArrayList(0); } else { newList = new ArrayList(oldList.size()); newList.addAll(oldList); newList.remove(o); return newList; |
void | removeAfter(List> children, int index) Removes all elements after the given index while (children.size() > index + 1) {
children.remove(children.size() - 1);
|
void | removeAll(List list, Object[] elements) remove All if (elements == null) { return; for (int i = 0; i < elements.length; i++) { list.remove(elements[i]); |
void | removeAll(List Removes all objects from list .
for (E object : objects) {
remove(list, object);
|