Ignore:
Timestamp:
2014-01-29T16:18:16+01:00 (10 years ago)
Author:
Don-vip
Message:

javadoc for gui.preferences.advanced package

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PrefEntry.java

    r6022 r6767  
    66
    77/**
    8  * Class to store single preference line for the table
    9  * @since 6021 : extracted from AdvancedPreference class
     8 * Class to store single preference line for the table.
     9 * @since 6021
    1010 */
    1111public class PrefEntry implements Comparable<PrefEntry> {
     
    1616    private boolean changed;
    1717
     18    /**
     19     * Constructs a new {@code PrefEntry}.
     20     * @param key The preference key
     21     * @param value The preference value
     22     * @param defaultValue The preference default value
     23     * @param isDefault determines if the current value is the default value
     24     */
    1825    public PrefEntry(String key, Preferences.Setting value, Preferences.Setting defaultValue, boolean isDefault) {
    1926        CheckParameterUtil.ensureParameterNotNull(key);
     
    2633    }
    2734
     35    /**
     36     * Returns the preference key.
     37     * @return the preference key
     38     */
    2839    public String getKey() {
    2940        return key;
    3041    }
    3142
     43    /**
     44     * Returns the preference value.
     45     * @return the preference value
     46     */
    3247    public Preferences.Setting getValue() {
    3348        return value;
    3449    }
    3550
     51    /**
     52     * Returns the preference default value.
     53     * @return the preference default value
     54     */
    3655    public Preferences.Setting getDefaultValue() {
    3756        return defaultValue;
    3857    }
    3958
     59    /**
     60     * Sets the preference value.
     61     * @param value the preference value
     62     */
    4063    public void setValue(Preferences.Setting value) {
    4164        this.value = value;
     
    4467    }
    4568
     69    /**
     70     * Determines if the current value is the default value.
     71     * @return {@code true} if the current value is the default value, {@code false} otherwise
     72     */
    4673    public boolean isDefault() {
    4774        return isDefault;
    4875    }
    4976
     77    /**
     78     * Determines if this preference entry has been modified.
     79     * @return {@code true} if this preference entry has been modified, {@code false} otherwise
     80     */
    5081    public boolean isChanged() {
    5182        return changed;
    5283    }
    5384
     85    /**
     86     * Marks this preference entry as modified.
     87     */
    5488    public void markAsChanged() {
    5589        changed = true;
    5690    }
    5791
     92    /**
     93     * Resets this preference entry to default state.
     94     */
    5895    public void reset() {
    5996        value = defaultValue;
Note: See TracChangeset for help on using the changeset viewer.