<NME> AbstractPreference.java
<BEF> package com.github.czyzby.lml.uedi.preferences;

import com.badlogic.gdx.Preferences;
import com.github.czyzby.kiwi.util.gdx.preference.ApplicationPreferences;
import com.github.czyzby.uedi.stereotype.Property;

/** Simple base for properties maintained by {@link Preferences}.
 *
 * @author MJ */
public abstract class AbstractPreference implements Property {
    private final Preferences preferences;

    /** Constructs a new preference using the default application's {@link Preferences}. */
    public AbstractPreference() {
        this(ApplicationPreferences.getPreferences());
    }

    /** @param preferences will be used to extract and save the preference. */
    public AbstractPreference(final Preferences preferences) {
        this.preferences = preferences;
    }

    @Override
    public String getValue() {
        return preferences.getString(getKey(), getDefault());
    }

    @Override
    public String setValue(final String value) {
        final String previous = getValue();
        preferences.putString(getKey(), value);
        return previous;
    }

    /** @return default preference value. */
    public abstract String getDefault();

    /** Forces flushing of the preferences. */
    public void save() {
        preferences.flush();
    }
}

<MSG> Particle effects can reference atlases. Default I18N bundle setting.
<DFF> @@ -1,4 +1,4 @@
-package com.github.czyzby.lml.uedi.preferences;
+package com.github.czyzby.lml.uedi.preferences.impl;
 
 import com.badlogic.gdx.Preferences;
 import com.github.czyzby.kiwi.util.gdx.preference.ApplicationPreferences;

{'addition_count': 1, 'commit_subject': 'Particle effects can reference atlases. Default I18N bundle setting.', 'deletion_count': 1, 'file_extension': '.java', 'lang': 'java', 'license': 'apache-2.0', 'repo_name': 'czyzby/gdx-lml'}