public static <T> void filterCollection(final Collection<T> coll, @NonNull final Predicate<T> retainCondition) {
        if (coll == null) {
            return;
        }
        final Iterator<T> it = coll.iterator();
        while (it.hasNext()) {
            final T item = it.next();
            if (!retainCondition.test(item)) {
                it.remove();
            }
        }
    }
executes a given action on each 'partitionSize' numer of elements of the given collection. If false is returned, action is abandoned
main/src/main/java/cgeo/geocaching/utils/CommonUtils.java