de.caff.util.settings

## Class SimpleStringPreferenceProperty

- java.lang.Object
- - de.caff.util.settings.AbstractBasicChangeableItem
  - - de.caff.util.settings.SimpleNullableProperty<java.lang.String>
    - - de.caff.util.settings.SimpleStringPreferenceProperty

- All Implemented Interfaces:
    ChangeableItem, PreferenceProperty, Property<java.lang.String>, StringPreferenceProperty, java.io.Serializable

      public class SimpleStringPreferenceProperty
      extends SimpleNullableProperty<java.lang.String>
      implements StringPreferenceProperty

  Since:
    November 27, 2016
  Author:
    Rammi
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from interface de.caff.util.settings.PreferenceProperty

      `PROPERTY_VALUE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleStringPreferenceProperty(java.lang.String basicName)` Constructor.
    `SimpleStringPreferenceProperty(java.lang.String basicName, java.lang.String value)` Constructor.
    `SimpleStringPreferenceProperty(java.lang.String basicName, java.lang.String value, UniformMatcher<? super java.lang.String> matcher)` Constructor.
    `SimpleStringPreferenceProperty(java.lang.String basicName, UniformMatcher<? super java.lang.String> matcher)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `readFrom(java.util.prefs.Preferences preferences)` Read the property value from the preferences.
    `void` | `storeTo(java.util.prefs.Preferences preferences)` Store the current property value in the preferences.

    - ### Methods inherited from class de.caff.util.settings.SimpleNullableProperty

      `getValue, setValue`

    - ### Methods inherited from class de.caff.util.settings.AbstractBasicChangeableItem

      `addValueChangeListener, addValueChangeListenerWeakly, firePropertyChange, fireValueChange, fireValueChange, fireValueChange, getBasicName, getPropertyName, removeValueChangeListener, removeValueChangeListenerWeakly`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface de.caff.util.settings.Property

      `getValue, setValue`

    - ### Methods inherited from interface de.caff.util.settings.ChangeableItem

      `addValueChangeListener, addValueChangeListenerWeakly, removeValueChangeListener, removeValueChangeListenerWeakly`

- - ### Constructor Detail

    - #### SimpleStringPreferenceProperty

          public SimpleStringPreferenceProperty(@NotNull
                                                java.lang.String basicName)

      Constructor. This will use a matcher using the `Object.equals(Object)` method and an initial value of `null`.
      Parameters:
        `basicName` - property name

    - #### SimpleStringPreferenceProperty

          public SimpleStringPreferenceProperty(@NotNull
                                                java.lang.String basicName,
                                                @Nullable
                                                java.lang.String value)

      Constructor. This will use an matcher using the `Object.equals(Object)` method.
      Parameters:
        `basicName` - property name
        `value` - initial value

    - #### SimpleStringPreferenceProperty

          public SimpleStringPreferenceProperty(@NotNull
                                                java.lang.String basicName,
                                                @NotNull
                                                UniformMatcher<? super java.lang.String> matcher)

      Constructor. This will use an initial value of `null`.
      Parameters:
        `basicName` - property name
        `matcher` - matcher which defines whether a newly set value differs from the current value

    - #### SimpleStringPreferenceProperty

          public SimpleStringPreferenceProperty(@NotNull
                                                java.lang.String basicName,
                                                @Nullable
                                                java.lang.String value,
                                                @NotNull
                                                UniformMatcher<? super java.lang.String> matcher)

      Constructor.
      Parameters:
        `basicName` - property name
        `value` - initial value
        `matcher` - matcher which defines whether a newly set value differs from the current value

  - ### Method Detail

    - #### readFrom

          public void readFrom(@NotNull
                               java.util.prefs.Preferences preferences)

      Read the property value from the preferences.
      Specified by:
        `readFrom` in interface `PreferenceProperty`
      Parameters:
        `preferences` - preferences from where to read the property value

    - #### storeTo

          public void storeTo(@NotNull
                              java.util.prefs.Preferences preferences)

      Store the current property value in the preferences.
      Specified by:
        `storeTo` in interface `PreferenceProperty`
      Parameters:
        `preferences` - preferences where to store the property value