// returns true if anything was removed static bool lambdaMapLike removeElementsThat(IPred pred, Cl c) { if (c == null || pred == null) false; Iterator it = iterator(c); bool change; while (it.hasNext()) if (pred.get(it.next())) { it.remove(); set change; } ret change; } static bool removeElementsThat(Cl c, IPred pred) { ret removeElementsThat(pred, c); }