de.caff.util.settings

## Interface EnumValue<E>

- All Known Implementing Classes:
    AbstractBasicEnumValue, EnumEnumValue, IntegerEnumValue, LocaleEnumValue

      public interface EnumValue<E>

  Description of an enum value.

  A enum value is described by a distinguished human-readable name, maybe further description, a possibility to read it from and write it to a Preferences object and the real value which it represents.

  Author:
    Rammi

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.swing.Icon` | `getIcon(java.util.Locale l)` Get a possible icon to display for this value.
    `java.lang.String` | `getLongName(java.util.Locale l)` Get a longer description which describes this value.
    `E` | `getRealValue()` Get the real value which is used in this enum.
    `java.lang.String` | `getShortName(java.util.Locale l)` Get a human readable name for this enum value.
    `boolean` | `isEqualTo(java.util.prefs.Preferences preferences, java.lang.String key)` Is this value equal to the value which is stored in the preferences under the given key?
    `void` | `storeTo(java.util.prefs.Preferences preferences, java.lang.String key)` Store this value to the preferences under the given key.

- - ### Method Detail

    - #### getShortName

          @NotNull
          java.lang.String getShortName(@Nullable
                                                 java.util.Locale l)

      Get a human readable name for this enum value.
      Parameters:
        `l` - locale to use
      Returns:
        human readable short name

    - #### getLongName

          @Nullable
          java.lang.String getLongName(@Nullable
                                                 java.util.Locale l)

      Get a longer description which describes this value.
      Parameters:
        `l` - locale to use
      Returns:
        human readable description or `null` if no description is available

    - #### getIcon

          javax.swing.Icon getIcon(@Nullable
                                   java.util.Locale l)

      Get a possible icon to display for this value.
      Parameters:
        `l` - locale to use
      Returns:
        icon or `null` if no icon is available

    - #### storeTo

          void storeTo(@NotNull
                       java.util.prefs.Preferences preferences,
                       @NotNull
                       java.lang.String key)

      Store this value to the preferences under the given key.
      Parameters:
        `preferences` - preferences to store to
        `key` - key under which to store

    - #### isEqualTo

          boolean isEqualTo(@NotNull
                            java.util.prefs.Preferences preferences,
                            @NotNull
                            java.lang.String key)

      Is this value equal to the value which is stored in the preferences under the given key?
      Parameters:
        `preferences` - preferences where a enum value is stored
        `key` - key under which the enum value is stored
      Returns:
        `true` if the enum value is equal to the one stored in the preferences, `false` otherwise

    - #### getRealValue

          E getRealValue()

      Get the real value which is used in this enum.
      Returns:
        the real value