public static <T> void executeOnPartitions(final Collection<T> coll, final int partitionSize, final Func1<List<T>, Boolean> action) {
        final List<T> sublist = new ArrayList<>(partitionSize);
        int cnt = 0;
        for (T element : coll) {
            sublist.add(element);
            cnt++;
            if (cnt == partitionSize) {
                final Boolean cont = action.call(sublist);
                if (!Boolean.TRUE.equals(cont)) {
                    return;
                }
                sublist.clear();
            }
        }
        if (!sublist.isEmpty()) {
            action.call(sublist);
        }
    }
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