public interface PrefService extends SciJavaService
Service
for storing and retrieving arbitrary preferences.Modifier and Type | Method and Description |
---|---|
void |
clear(Class<?> c)
Deletes all of the given
Class 's keys from persistent storage. |
void |
clear(Class<?> c,
String name)
Deprecated.
|
default void |
clear(String key)
Deprecated.
Use
remove(Class, String) or clear(Class) . |
void |
clear(String absolutePath,
String key)
Deprecated.
|
void |
clearAll()
Deletes all information from the data store.
|
default String |
get(Class<?> c,
String name)
Gets a persisted key as a
String . |
String |
get(Class<?> c,
String name,
String defaultValue)
Gets a persisted key as a
String . |
default String |
get(String name)
Deprecated.
Use
get(Class, String) . |
default String |
get(String name,
String defaultValue)
Deprecated.
|
boolean |
getBoolean(Class<?> c,
String name,
boolean defaultValue)
Gets a persisted key as a
boolean . |
default boolean |
getBoolean(String name,
boolean defaultValue)
Deprecated.
|
double |
getDouble(Class<?> c,
String name,
double defaultValue)
Gets a persisted key as a
double . |
default double |
getDouble(String name,
double defaultValue)
Deprecated.
|
float |
getFloat(Class<?> c,
String name,
float defaultValue)
Gets a persisted key as a
float . |
default float |
getFloat(String name,
float defaultValue)
Deprecated.
|
int |
getInt(Class<?> c,
String name,
int defaultValue)
Gets a persisted key as an
int . |
default int |
getInt(String name,
int defaultValue)
Deprecated.
|
Iterable<String> |
getIterable(Class<?> c,
String name)
Deprecated.
|
default Iterable<String> |
getIterable(String key)
Deprecated.
User
getList(Class, String) . |
List<String> |
getList(Class<?> c)
Deprecated.
|
List<String> |
getList(Class<?> c,
String name)
Gets a persisted key as a
List . |
default List<String> |
getList(String key)
Deprecated.
|
List<String> |
getList(String absolutePath,
String key)
Deprecated.
|
long |
getLong(Class<?> c,
String name,
long defaultValue)
Gets a persisted key as a
long . |
default long |
getLong(String name,
long defaultValue)
Deprecated.
|
Map<String,String> |
getMap(Class<?> c)
Deprecated.
|
Map<String,String> |
getMap(Class<?> c,
String name)
Gets a persisted key as a
Map . |
default Map<String,String> |
getMap(String key)
Deprecated.
|
Map<String,String> |
getMap(String absolutePath,
String key)
Deprecated.
|
void |
put(Class<?> c,
String name,
boolean value)
Saves a key/value pair in persistent storage.
|
void |
put(Class<?> c,
String name,
double value)
Saves a key/value pair in persistent storage.
|
void |
put(Class<?> c,
String name,
float value)
Saves a key/value pair in persistent storage.
|
void |
put(Class<?> c,
String name,
int value)
Saves a key/value pair in persistent storage.
|
void |
put(Class<?> c,
String name,
Iterable<String> value)
Saves a key/value pair in persistent storage.
|
void |
put(Class<?> c,
String name,
long value)
Saves a key/value pair in persistent storage.
|
void |
put(Class<?> c,
String name,
Map<String,String> value)
Saves a key/value pair in persistent storage.
|
void |
put(Class<?> c,
String name,
String value)
Saves a key/value pair in persistent storage.
|
default void |
put(String name,
boolean value)
Deprecated.
|
default void |
put(String name,
double value)
Deprecated.
|
default void |
put(String name,
float value)
Deprecated.
|
default void |
put(String name,
int value)
Deprecated.
|
default void |
put(String name,
long value)
Deprecated.
|
default void |
put(String name,
String value)
Deprecated.
|
default void |
putIterable(Class<?> c,
Iterable<String> iterable,
String name)
Deprecated.
|
default void |
putIterable(Iterable<String> iterable,
String key)
Deprecated.
|
void |
putList(Class<?> c,
List<String> list)
Deprecated.
|
default void |
putList(Class<?> c,
List<String> list,
String name)
Deprecated.
|
default void |
putList(List<String> list,
String key)
Deprecated.
|
void |
putList(String absolutePath,
List<String> list)
Deprecated.
|
void |
putList(String absolutePath,
List<String> list,
String key)
Deprecated.
|
void |
putMap(Class<?> c,
Map<String,String> map)
Deprecated.
|
default void |
putMap(Class<?> c,
Map<String,String> map,
String name)
Deprecated.
|
default void |
putMap(Map<String,String> map,
String key)
Deprecated.
|
void |
putMap(String absolutePath,
Map<String,String> map)
Deprecated.
|
void |
putMap(String absolutePath,
Map<String,String> map,
String key)
Deprecated.
|
void |
remove(Class<?> c,
String name)
Deletes a key from persistent storage.
|
void |
remove(String absolutePath,
String key)
Deprecated.
|
initialize, registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
dispose
default String get(Class<?> c, String name)
String
.c
- The class with which the key is associated.name
- The key to retrieve.String
, or null if the key is not
present.String get(Class<?> c, String name, String defaultValue)
String
.c
- The class with which the key is associated.name
- The key to retrieve.defaultValue
- The value to return if the key is not present.String
.boolean getBoolean(Class<?> c, String name, boolean defaultValue)
boolean
.c
- The class with which the key is associated.name
- The key to retrieve.defaultValue
- The value to return if the key is not present.boolean
.double getDouble(Class<?> c, String name, double defaultValue)
double
.c
- The class with which the key is associated.name
- The key to retrieve.defaultValue
- The value to return if the key is not present.double
.float getFloat(Class<?> c, String name, float defaultValue)
float
.c
- The class with which the key is associated.name
- The key to retrieve.defaultValue
- The value to return if the key is not present.float
.int getInt(Class<?> c, String name, int defaultValue)
int
.c
- The class with which the key is associated.name
- The key to retrieve.defaultValue
- The value to return if the key is not present.int
.long getLong(Class<?> c, String name, long defaultValue)
long
.c
- The class with which the key is associated.name
- The key to retrieve.defaultValue
- The value to return if the key is not present.long
.Map<String,String> getMap(Class<?> c, String name)
Map
.c
- The class with which the key is associated.name
- The key to retrieve.Map
, or null if the key is not
present.List<String> getList(Class<?> c, String name)
List
.c
- The class with which the key is associated.name
- The key to retrieve.List
, or null if the key is not
present.void put(Class<?> c, String name, String value)
c
- The class with which the key/value pair is associated.name
- The key where the value should be stored.value
- The value to store.get(Class, String)
,
get(Class, String, String)
void put(Class<?> c, String name, boolean value)
c
- The class with which the key/value pair is associated.name
- The key where the value should be stored.value
- The value to store.getBoolean(Class, String, boolean)
void put(Class<?> c, String name, double value)
c
- The class with which the key/value pair is associated.name
- The key where the value should be stored.value
- The value to store.getDouble(Class, String, double)
void put(Class<?> c, String name, float value)
c
- The class with which the key/value pair is associated.name
- The key where the value should be stored.value
- The value to store.getFloat(Class, String, float)
void put(Class<?> c, String name, int value)
c
- The class with which the key/value pair is associated.name
- The key where the value should be stored.value
- The value to store.getInt(Class, String, int)
void put(Class<?> c, String name, long value)
c
- The class with which the key/value pair is associated.name
- The key where the value should be stored.value
- The value to store.getLong(Class, String, long)
void put(Class<?> c, String name, Map<String,String> value)
c
- The class with which the key/value pair is associated.name
- The key where the value should be stored.value
- The value to store.getMap(Class, String)
void put(Class<?> c, String name, Iterable<String> value)
c
- The class with which the key/value pair is associated.name
- The key where the value should be stored.value
- The value to store.getList(Class, String)
void remove(Class<?> c, String name)
c
- The class with which the key is associated.name
- The key to remove.void clear(Class<?> c)
Class
's keys from persistent storage.c
- The class whose keys should be removed.void clearAll()
@Deprecated default void putMap(Class<?> c, Map<String,String> map, String name)
put(Class, String, Map)
.@Deprecated void putMap(Class<?> c, Map<String,String> map)
put(Class, String, Map)
.@Deprecated Map<String,String> getMap(Class<?> c)
getMap(Class, String)
.@Deprecated default void putList(Class<?> c, List<String> list, String name)
put(Class, String, Iterable)
.@Deprecated void putList(Class<?> c, List<String> list)
put(Class, String, Iterable)
.@Deprecated List<String> getList(Class<?> c)
getList(Class, String)
.@Deprecated default void putIterable(Class<?> c, Iterable<String> iterable, String name)
put(Class, String, Iterable)
.@Deprecated Iterable<String> getIterable(Class<?> c, String name)
getList(Class, String)
.@Deprecated default String get(String name)
get(Class, String)
.@Deprecated default String get(String name, String defaultValue)
get(Class, String, String)
.@Deprecated default boolean getBoolean(String name, boolean defaultValue)
getBoolean(Class, String, boolean)
.@Deprecated default double getDouble(String name, double defaultValue)
getDouble(Class, String, double)
.@Deprecated default float getFloat(String name, float defaultValue)
getFloat(Class, String, float)
.@Deprecated default int getInt(String name, int defaultValue)
getInt(Class, String, int)
.@Deprecated default long getLong(String name, long defaultValue)
getLong(Class, String, long)
.@Deprecated default void put(String name, String value)
put(Class, String, String)
.@Deprecated default void put(String name, boolean value)
put(Class, String, boolean)
.@Deprecated default void put(String name, double value)
put(Class, String, double)
.@Deprecated default void put(String name, float value)
put(Class, String, float)
.@Deprecated default void put(String name, int value)
put(Class, String, int)
.@Deprecated default void put(String name, long value)
put(Class, String, long)
.@Deprecated default void clear(String key)
remove(Class, String)
or clear(Class)
.@Deprecated void clear(String absolutePath, String key)
remove(Class, String)
.@Deprecated void remove(String absolutePath, String key)
remove(Class, String)
.@Deprecated default void putMap(Map<String,String> map, String key)
put(Class, String, Map)
.@Deprecated void putMap(String absolutePath, Map<String,String> map)
put(Class, String, Map)
.@Deprecated void putMap(String absolutePath, Map<String,String> map, String key)
put(Class, String, Map)
.@Deprecated default Map<String,String> getMap(String key)
getMap(Class, String)
.@Deprecated Map<String,String> getMap(String absolutePath, String key)
getMap(Class, String)
.@Deprecated default void putList(List<String> list, String key)
put(Class, String, Iterable)
.@Deprecated void putList(String absolutePath, List<String> list, String key)
put(Class, String, Iterable)
.@Deprecated void putList(String absolutePath, List<String> list)
put(Class, String, Iterable)
.@Deprecated default List<String> getList(String key)
getList(Class, String)
.@Deprecated List<String> getList(String absolutePath, String key)
getList(Class, String)
.@Deprecated default void putIterable(Iterable<String> iterable, String key)
put(Class, String, Iterable)
.@Deprecated default Iterable<String> getIterable(String key)
getList(Class, String)
.@Deprecated void clear(Class<?> c, String name)
remove(Class, String)
.Copyright © 2015–2022 SciJava. All rights reserved.