public static <E extends Enum<E>> int enumToInt(final E value) {
        return value == null ? -1 : value.ordinal();
    }
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