de.caff.util.settings

## Class BasicPhysicalLengthPreferenceProperty

- java.lang.Object
- - de.caff.util.settings.AbstractBasicChangeableItem
  - - de.caff.util.settings.BasicPhysicalLengthPreferenceProperty

- All Implemented Interfaces:
    ChangeableItem, PhysicalLengthPreferenceProperty, PreferenceProperty, Property<PhysicalLength>, java.io.Serializable

      public class BasicPhysicalLengthPreferenceProperty
      extends AbstractBasicChangeableItem
      implements PhysicalLengthPreferenceProperty

  Basic implementation of a `PhysicalLength` preference property.
  Since:
    Mai.25, 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
    `BasicPhysicalLengthPreferenceProperty(java.lang.String basicName)` Constructor.
    `BasicPhysicalLengthPreferenceProperty(java.lang.String basicName, PhysicalLength length)` Constructor.

  - ### Method Summary

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

    - ### 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.ChangeableItem

      `addValueChangeListener, addValueChangeListenerWeakly, removeValueChangeListener, removeValueChangeListenerWeakly`

- - ### Constructor Detail

    - #### BasicPhysicalLengthPreferenceProperty

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

      Constructor. Construct a property with the given name.
      Parameters:
        `basicName` - name or name prefix

    - #### BasicPhysicalLengthPreferenceProperty

          public BasicPhysicalLengthPreferenceProperty(@NotNull
                                                       java.lang.String basicName,
                                                       @Nullable
                                                       PhysicalLength length)

      Constructor. Construct a property with the given name and value.
      Parameters:
        `basicName` - name or name prefix
        `length` - start length, use `null` for undefined

  - ### 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

    - #### getValue

          public PhysicalLength getValue()

      Get the value of the property.
      Specified by:
        `getValue` in interface `Property<PhysicalLength>`
      Returns:
        property value

    - #### setValue

          public void setValue(PhysicalLength value)

      Set the value.
      Specified by:
        `setValue` in interface `Property<PhysicalLength>`
      Parameters:
        `value` - new value