List of utility methods to do ArrayList Remove
String | removeAdditionalRanges(String line, ArrayList Removes ranges of characters from a line and adds their indices to an ArrayList. int offset = 0; for (int i = 0; i < newRanges.size(); i++) { line = line.substring(0, newRanges.get(i)[0]) + line.substring(newRanges.get(i)[1] + 1); while (indices.get(offset) <= newRanges.get(i)[0] + offset) offset++; int insideOffset = 0; while (offset + insideOffset < indices.size() && indices.get(offset + insideOffset) <= newRanges.get(i)[1] + offset + insideOffset) ... |
boolean | removeAllFromArrayList(ArrayList remove All From Array List boolean result = false; for (int i = collection.size(); --i >= 0;) if (toRemove.contains(collection.get(i))) { collection.remove(i); result = true; return result; |
void | removeAllListaProd(ArrayList lista) remove All Lista Prod lista = new ArrayList();
|
ArrayList | removeAlreadyParsedFolders(ArrayList remove Already Parsed Folders int i; ArrayList<String> newList = listStrings; if (!pickup.isEmpty()) { for (i = 0; i < listStrings.size(); i++) if (listStrings.get(i).contains(pickup)) { newList = new ArrayList<>(listStrings.subList(i, listStrings.size())); break; if (!limit.isEmpty()) { for (i = 0; i < newList.size(); i++) if (newList.get(i).contains(limit)) { newList = new ArrayList<>(newList.subList(0, i)); break; return newList; |
boolean | removeByReference(ArrayList Removes the given object from the list using reference equality, not equals() if (list == null) return false; int size = list.size(); for (int i = 0; i < size; i++) { if (list.get(i) == object) { list.remove(i); return true; return false; |
ArrayList | removeDuplicates(ArrayList remove Duplicates Set<String> hs = new HashSet<>(); hs.addAll(al); al.clear(); al.addAll(hs); return al; |
ArrayList | removeDuplicates(ArrayList remove Duplicates ArrayList<T> result = new ArrayList<T>(); for (T t : a) if (!result.contains(t)) result.add(t); return result; |
void | removeDuplicateWithOrder(List arrayList) remove Duplicate With Order Set set = new HashSet(); List newList = new ArrayList(); for (Iterator iter = arrayList.iterator(); iter.hasNext();) { Object element = iter.next(); if (set.add(element)) { newList.add(element); arrayList.clear(); arrayList.addAll(newList); |
void | removeElementsFromIndexToEnd(ArrayList list, int index) remove Elements From Index To End for (int i = list.size() - 1; i >= index; i--) list.remove(i); |
String | removeExtraPunctuation(String line, int startChar, ArrayList Removes extra punctuation from the passed text that are found in quotations or parentheses. StringBuffer buffer = new StringBuffer(line); boolean inParentheses = false; for (int i = 0; i < buffer.length(); i++) { char c = buffer.charAt(i); if (c == ')') inParentheses = false; if (inParentheses || c == '[' || c == ']' || c == '/') indices.add(startChar + i); ... |