public static <E extends Enum<E>> E intToEnum(final Class<E> clazz, final int value, final E defaultValue) {
        final E[] enumValues = clazz.getEnumConstants();
        return value < 0 || enumValues == null || value >= enumValues.length ? defaultValue : enumValues[value];
    }
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