Package org.scijava.prefs
Interface PrefService
-
- All Superinterfaces:
Comparable<Prioritized>,Contextual,Disposable,HasPluginInfo,Identifiable,Initializable,Locatable,Logged,Prioritized,RichPlugin,SciJavaPlugin,SciJavaService,Service,Versioned
- All Known Implementing Classes:
AbstractPrefService,DefaultPrefService
public interface PrefService extends SciJavaService
Servicefor storing and retrieving arbitrary preferences.- Author:
- Mark Hiner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidclear(Class<?> c)Deletes all of the givenClass's keys from persistent storage.voidclear(Class<?> c, String name)Deprecated.default voidclear(String key)Deprecated.Useremove(Class, String)orclear(Class).voidclear(String absolutePath, String key)Deprecated.voidclearAll()Deletes all information from the data store.default Stringget(Class<?> c, String name)Gets a persisted key as aString.Stringget(Class<?> c, String name, String defaultValue)Gets a persisted key as aString.default Stringget(String name)Deprecated.Useget(Class, String).default Stringget(String name, String defaultValue)Deprecated.booleangetBoolean(Class<?> c, String name, boolean defaultValue)Gets a persisted key as aboolean.default booleangetBoolean(String name, boolean defaultValue)Deprecated.doublegetDouble(Class<?> c, String name, double defaultValue)Gets a persisted key as adouble.default doublegetDouble(String name, double defaultValue)Deprecated.floatgetFloat(Class<?> c, String name, float defaultValue)Gets a persisted key as afloat.default floatgetFloat(String name, float defaultValue)Deprecated.intgetInt(Class<?> c, String name, int defaultValue)Gets a persisted key as anint.default intgetInt(String name, int defaultValue)Deprecated.Iterable<String>getIterable(Class<?> c, String name)Deprecated.default Iterable<String>getIterable(String key)Deprecated.UsergetList(Class, String).List<String>getList(Class<?> c)Deprecated.List<String>getList(Class<?> c, String name)Gets a persisted key as aList.default List<String>getList(String key)Deprecated.List<String>getList(String absolutePath, String key)Deprecated.longgetLong(Class<?> c, String name, long defaultValue)Gets a persisted key as along.default longgetLong(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 aMap.default Map<String,String>getMap(String key)Deprecated.Map<String,String>getMap(String absolutePath, String key)Deprecated.voidput(Class<?> c, String name, boolean value)Saves a key/value pair in persistent storage.voidput(Class<?> c, String name, double value)Saves a key/value pair in persistent storage.voidput(Class<?> c, String name, float value)Saves a key/value pair in persistent storage.voidput(Class<?> c, String name, int value)Saves a key/value pair in persistent storage.voidput(Class<?> c, String name, long value)Saves a key/value pair in persistent storage.voidput(Class<?> c, String name, Iterable<String> value)Saves a key/value pair in persistent storage.voidput(Class<?> c, String name, String value)Saves a key/value pair in persistent storage.voidput(Class<?> c, String name, Map<String,String> value)Saves a key/value pair in persistent storage.default voidput(String name, boolean value)Deprecated.default voidput(String name, double value)Deprecated.default voidput(String name, float value)Deprecated.default voidput(String name, int value)Deprecated.default voidput(String name, long value)Deprecated.default voidput(String name, String value)Deprecated.default voidputIterable(Class<?> c, Iterable<String> iterable, String name)Deprecated.default voidputIterable(Iterable<String> iterable, String key)Deprecated.voidputList(Class<?> c, List<String> list)Deprecated.default voidputList(Class<?> c, List<String> list, String name)Deprecated.voidputList(String absolutePath, List<String> list)Deprecated.voidputList(String absolutePath, List<String> list, String key)Deprecated.default voidputList(List<String> list, String key)Deprecated.voidputMap(Class<?> c, Map<String,String> map)Deprecated.default voidputMap(Class<?> c, Map<String,String> map, String name)Deprecated.voidputMap(String absolutePath, Map<String,String> map)Deprecated.voidputMap(String absolutePath, Map<String,String> map, String key)Deprecated.default voidputMap(Map<String,String> map, String key)Deprecated.voidremove(Class<?> c, String name)Deletes a key from persistent storage.voidremove(String absolutePath, String key)Deprecated.-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.Disposable
dispose
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface org.scijava.Locatable
getLocation
-
Methods inherited from interface org.scijava.Prioritized
compareTo, getPriority, setPriority
-
Methods inherited from interface org.scijava.plugin.RichPlugin
getIdentifier, log
-
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Method Detail
-
get
default String get(Class<?> c, String name)
Gets a persisted key as aString.- Parameters:
c- The class with which the key is associated.name- The key to retrieve.- Returns:
- The value of the key as a
String, or null if the key is not present.
-
get
String get(Class<?> c, String name, String defaultValue)
Gets a persisted key as aString.- Parameters:
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.- Returns:
- The value of the key as a
String.
-
getBoolean
boolean getBoolean(Class<?> c, String name, boolean defaultValue)
Gets a persisted key as aboolean.- Parameters:
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.- Returns:
- The value of the key as a
boolean.
-
getDouble
double getDouble(Class<?> c, String name, double defaultValue)
Gets a persisted key as adouble.- Parameters:
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.- Returns:
- The value of the key as a
double.
-
getFloat
float getFloat(Class<?> c, String name, float defaultValue)
Gets a persisted key as afloat.- Parameters:
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.- Returns:
- The value of the key as a
float.
-
getInt
int getInt(Class<?> c, String name, int defaultValue)
Gets a persisted key as anint.- Parameters:
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.- Returns:
- The value of the key as an
int.
-
getLong
long getLong(Class<?> c, String name, long defaultValue)
Gets a persisted key as along.- Parameters:
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.- Returns:
- The value of the key as an
long.
-
getMap
Map<String,String> getMap(Class<?> c, String name)
Gets a persisted key as aMap.- Parameters:
c- The class with which the key is associated.name- The key to retrieve.- Returns:
- The value of the key as an
Map, or null if the key is not present.
-
getList
List<String> getList(Class<?> c, String name)
Gets a persisted key as aList.- Parameters:
c- The class with which the key is associated.name- The key to retrieve.- Returns:
- The value of the key as an
List, or null if the key is not present.
-
put
void put(Class<?> c, String name, String value)
Saves a key/value pair in persistent storage.- Parameters:
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.- See Also:
get(Class, String),get(Class, String, String)
-
put
void put(Class<?> c, String name, boolean value)
Saves a key/value pair in persistent storage.- Parameters:
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.- See Also:
getBoolean(Class, String, boolean)
-
put
void put(Class<?> c, String name, double value)
Saves a key/value pair in persistent storage.- Parameters:
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.- See Also:
getDouble(Class, String, double)
-
put
void put(Class<?> c, String name, float value)
Saves a key/value pair in persistent storage.- Parameters:
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.- See Also:
getFloat(Class, String, float)
-
put
void put(Class<?> c, String name, int value)
Saves a key/value pair in persistent storage.- Parameters:
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.- See Also:
getInt(Class, String, int)
-
put
void put(Class<?> c, String name, long value)
Saves a key/value pair in persistent storage.- Parameters:
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.- See Also:
getLong(Class, String, long)
-
put
void put(Class<?> c, String name, Map<String,String> value)
Saves a key/value pair in persistent storage.- Parameters:
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.- See Also:
getMap(Class, String)
-
put
void put(Class<?> c, String name, Iterable<String> value)
Saves a key/value pair in persistent storage.- Parameters:
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.- See Also:
getList(Class, String)
-
remove
void remove(Class<?> c, String name)
Deletes a key from persistent storage.- Parameters:
c- The class with which the key is associated.name- The key to remove.
-
clear
void clear(Class<?> c)
Deletes all of the givenClass's keys from persistent storage.- Parameters:
c- The class whose keys should be removed.
-
clearAll
void clearAll()
Deletes all information from the data store. Use with care!
-
putMap
@Deprecated default void putMap(Class<?> c, Map<String,String> map, String name)
Deprecated.
-
putMap
@Deprecated void putMap(Class<?> c, Map<String,String> map)
Deprecated.
-
getMap
@Deprecated Map<String,String> getMap(Class<?> c)
Deprecated.
-
putList
@Deprecated default void putList(Class<?> c, List<String> list, String name)
Deprecated.
-
putList
@Deprecated void putList(Class<?> c, List<String> list)
Deprecated.
-
getList
@Deprecated List<String> getList(Class<?> c)
Deprecated.
-
putIterable
@Deprecated default void putIterable(Class<?> c, Iterable<String> iterable, String name)
Deprecated.
-
getIterable
@Deprecated Iterable<String> getIterable(Class<?> c, String name)
Deprecated.
-
get
@Deprecated default String get(String name)
Deprecated.Useget(Class, String).
-
get
@Deprecated default String get(String name, String defaultValue)
Deprecated.
-
getBoolean
@Deprecated default boolean getBoolean(String name, boolean defaultValue)
Deprecated.
-
getDouble
@Deprecated default double getDouble(String name, double defaultValue)
Deprecated.
-
getFloat
@Deprecated default float getFloat(String name, float defaultValue)
Deprecated.
-
getInt
@Deprecated default int getInt(String name, int defaultValue)
Deprecated.
-
getLong
@Deprecated default long getLong(String name, long defaultValue)
Deprecated.
-
put
@Deprecated default void put(String name, String value)
Deprecated.
-
put
@Deprecated default void put(String name, boolean value)
Deprecated.
-
put
@Deprecated default void put(String name, double value)
Deprecated.
-
put
@Deprecated default void put(String name, float value)
Deprecated.
-
put
@Deprecated default void put(String name, int value)
Deprecated.
-
put
@Deprecated default void put(String name, long value)
Deprecated.
-
clear
@Deprecated default void clear(String key)
Deprecated.Useremove(Class, String)orclear(Class).
-
clear
@Deprecated void clear(String absolutePath, String key)
Deprecated.
-
remove
@Deprecated void remove(String absolutePath, String key)
Deprecated.
-
putMap
@Deprecated default void putMap(Map<String,String> map, String key)
Deprecated.
-
putMap
@Deprecated void putMap(String absolutePath, Map<String,String> map)
Deprecated.
-
putMap
@Deprecated void putMap(String absolutePath, Map<String,String> map, String key)
Deprecated.
-
getMap
@Deprecated default Map<String,String> getMap(String key)
Deprecated.
-
putList
@Deprecated default void putList(List<String> list, String key)
Deprecated.
-
putList
@Deprecated void putList(String absolutePath, List<String> list, String key)
Deprecated.
-
putList
@Deprecated void putList(String absolutePath, List<String> list)
Deprecated.
-
getList
@Deprecated default List<String> getList(String key)
Deprecated.
-
getList
@Deprecated List<String> getList(String absolutePath, String key)
Deprecated.
-
putIterable
@Deprecated default void putIterable(Iterable<String> iterable, String key)
Deprecated.
-
getIterable
@Deprecated default Iterable<String> getIterable(String key)
Deprecated.UsergetList(Class, String).
-
clear
@Deprecated void clear(Class<?> c, String name)
Deprecated.
-
-