package cz.hobrasoft.pdfmu;

import java.util.Properties;

/**
 * Properties with integer values
 *
 * @author <a href="mailto:filip.bartek@hobrasoft.cz">Filip Bartek</a>
 */
public class IntProperties extends Properties {

    private final int def;

    /**
     * Creates an empty property list with a default value.
     *
     * @param def the default property value.
     */
    public IntProperties(int def) {
        super();
        this.def = def;
    }

    /**
     * Returns the integer value of the property with the specified key in this
     * property list. The underlying {@link String} value is converted to an
     * integer using {@link Integer#parseInt(String)}.
     *
     * @param key the property key.
     * @return the value associated with the specified key, or the default value
     * if the property is not found.
     */
    public int getIntProperty(String key) {
        String valueString = getProperty(key);
        if (valueString != null) {
            return Integer.parseInt(valueString);
        } else {
            return def;
        }
    }
}

@@ -41,25 +41,112 @@
 va.util.
-Propertie
+Collection;%0D%0Aimport java.util.Properties;%0D%0Aimport org.apache.commons.collections4.CollectionUtil
 s;%0D%0A%0D%0A/*
@@ -1206,12 +1206,576 @@
 %0D%0A    %7D%0D
+%0A%0D%0A    /**%0D%0A     * Returns a %7B@link Collection%7D of %7B@link Integer%7D property values in this%0D%0A     * %7B@link IntProperties%7D.%0D%0A     *%0D%0A     * %3Cp%3E%0D%0A     * Ignores the defaults.%0D%0A     *%0D%0A     * @return a collection of integer values in this instance of%0D%0A     * %7B@link IntProperties%7D.%0D%0A     */%0D%0A    public Collection%3CInteger%3E intPropertyValues() %7B%0D%0A        Collection%3CInteger%3E intValues = CollectionUtils.collect(values(), IntegerValueTransformer.integerValueTransformer());%0D%0A        // TODO?: Collect values from %60defaults%60 recursively%0D%0A        return intValues;%0D%0A    %7D%0D
 %0A%7D%0D%0A

Add method intPropertyValues