List of utility methods to do Collection Minus
List | minus(Collection c1, Collection c2) minus List c1_ = new ArrayList(); if (isNotEmpty(c1)) { c1_.addAll(c1); c1_.removeAll(c2); return c1_; |
void | minus(Collection src, Collection ref) minus Iterator it = ref.iterator(); while (it.hasNext()) { Object obj = it.next(); if (src.contains(obj)) src.remove(obj); return; |
Collection | minus(Collection toBeDeletedFrom, Collection tobeDeleted) minus ArrayList result = new ArrayList(toBeDeletedFrom); Iterator it = tobeDeleted.iterator(); while (it.hasNext()) { Object oj = it.next(); if (toBeDeletedFrom.contains(oj)) { result.remove(oj); return result; |