public interface EnumValue<E>
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.
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.
|
@NotNull java.lang.String getShortName(@Nullable java.util.Locale l)
l
- locale to use@Nullable java.lang.String getLongName(@Nullable java.util.Locale l)
l
- locale to usenull
if no description is availablejavax.swing.Icon getIcon(@Nullable java.util.Locale l)
l
- locale to usenull
if no icon is availablevoid storeTo(@NotNull java.util.prefs.Preferences preferences, @NotNull java.lang.String key)
preferences
- preferences to store tokey
- key under which to storeboolean isEqualTo(@NotNull java.util.prefs.Preferences preferences, @NotNull java.lang.String key)
preferences
- preferences where a enum value is storedkey
- key under which the enum value is storedtrue
if the enum value is equal to the one stored in the preferences,
false
otherwiseE getRealValue()