public final class OsgiPreferenceStorage extends Object implements OptionStorage
Preferences| Constructor and Description |
|---|
OsgiPreferenceStorage(org.osgi.service.prefs.Preferences preferences) |
| Modifier and Type | Method and Description |
|---|---|
<V> boolean |
consumable(Class<V> valueType)
Checks if the value type can be consumed by an enclosed storage.
|
<V> V |
load(OptionMetadata<V> option)
Loads the value of specified option from an enclosed storage.
|
<V> void |
save(V value,
OptionMetadata<V> option)
Saves the value of specified option to the enclosed storage.
|
public OsgiPreferenceStorage(org.osgi.service.prefs.Preferences preferences)
preferences - the OSGi preference node, must not be nullpublic <V> boolean consumable(Class<V> valueType)
OptionStorageconsumable in interface OptionStorageV - the value type for the optionvalueType - the value type to be checkedpublic <V> V load(OptionMetadata<V> option)
OptionStorageload in interface OptionStorageV - the value type for the optionoption - the option metadata, must not be null.OptionStorage.consumable(Class),
OptionMetadatapublic <V> void save(V value,
OptionMetadata<V> option)
OptionStoragesave in interface OptionStorageV - the value type for the optionvalue - to be saved, must not be null.option - the option metadata, must not be null.OptionStorage.consumable(Class),
OptionMetadataCopyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.