public ProgressDialogFeature<P> setProgressParameter(final int maxValue, final Function<P, Integer> progressMapper) {
        this.indeterminate = false;
        this.maxValue = maxValue;
        this.progressMapper = progressMapper;
        return this;
    }
Feature to surround execution of a worker task visually with a progress dialog
main/src/main/java/cgeo/geocaching/utils/workertask/ProgressDialogFeature.java