public class DefaultPrefService extends AbstractPrefService
PrefService implementation, which persists preferences to
disk using the Preferences API.| Constructor and Description |
|---|
DefaultPrefService() |
| 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.
|
void |
clear(String absolutePath,
String key)
Deprecated.
|
void |
clearAll()
Deletes all information from the data store.
|
String |
get(Class<?> c,
String name,
String defaultValue)
Gets a persisted key as a
String. |
boolean |
getBoolean(Class<?> c,
String name,
boolean defaultValue)
Gets a persisted key as a
boolean. |
double |
getDouble(Class<?> c,
String name,
double defaultValue)
Gets a persisted key as a
double. |
float |
getFloat(Class<?> c,
String name,
float defaultValue)
Gets a persisted key as a
float. |
int |
getInt(Class<?> c,
String name,
int defaultValue)
Gets a persisted key as an
int. |
Iterable<String> |
getIterable(Class<?> c,
String name)
Deprecated.
|
List<String> |
getList(Class<?> c)
Deprecated.
|
List<String> |
getList(Class<?> c,
String name)
Gets a persisted key as a
List. |
List<String> |
getList(String absolutePath,
String key)
Deprecated.
|
long |
getLong(Class<?> c,
String name,
long defaultValue)
Gets a persisted key as a
long. |
Map<String,String> |
getMap(Class<?> c)
Deprecated.
|
Map<String,String> |
getMap(Class<?> c,
String name)
Gets a persisted key as a
Map. |
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.
|
void |
putList(Class<?> c,
List<String> list)
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.
|
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.
|
initializegetContext, setContext, toStringgetInfo, getPriority, setInfo, setPrioritycontextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclear, get, get, get, getBoolean, getDouble, getFloat, getInt, getIterable, getList, getLong, getMap, put, put, put, put, put, put, putIterable, putIterable, putList, putList, putMap, putMapregisterEventHandlersgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersiondisposepublic String get(Class<?> c, String name, String defaultValue)
PrefServiceString.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.public boolean getBoolean(Class<?> c, String name, boolean defaultValue)
PrefServiceboolean.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.public double getDouble(Class<?> c, String name, double defaultValue)
PrefServicedouble.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.public float getFloat(Class<?> c, String name, float defaultValue)
PrefServicefloat.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.public int getInt(Class<?> c, String name, int defaultValue)
PrefServiceint.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.public long getLong(Class<?> c, String name, long defaultValue)
PrefServicelong.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.public Map<String,String> getMap(Class<?> c, String name)
PrefServiceMap.c - The class with which the key is associated.name - The key to retrieve.Map, or null if the key is not
present.public List<String> getList(Class<?> c, String name)
PrefServiceList.c - The class with which the key is associated.name - The key to retrieve.List, or null if the key is not
present.public void put(Class<?> c, String name, String value)
PrefServicec - The class with which the key/value pair is associated.name - The key where the value should be stored.value - The value to store.PrefService.get(Class, String),
PrefService.get(Class, String, String)public void put(Class<?> c, String name, boolean value)
PrefServicec - The class with which the key/value pair is associated.name - The key where the value should be stored.value - The value to store.PrefService.getBoolean(Class, String, boolean)public void put(Class<?> c, String name, double value)
PrefServicec - The class with which the key/value pair is associated.name - The key where the value should be stored.value - The value to store.PrefService.getDouble(Class, String, double)public void put(Class<?> c, String name, float value)
PrefServicec - The class with which the key/value pair is associated.name - The key where the value should be stored.value - The value to store.PrefService.getFloat(Class, String, float)public void put(Class<?> c, String name, int value)
PrefServicec - The class with which the key/value pair is associated.name - The key where the value should be stored.value - The value to store.PrefService.getInt(Class, String, int)public void put(Class<?> c, String name, long value)
PrefServicec - The class with which the key/value pair is associated.name - The key where the value should be stored.value - The value to store.PrefService.getLong(Class, String, long)public void put(Class<?> c, String name, Map<String,String> value)
PrefServicec - The class with which the key/value pair is associated.name - The key where the value should be stored.value - The value to store.PrefService.getMap(Class, String)public void put(Class<?> c, String name, Iterable<String> value)
PrefServicec - The class with which the key/value pair is associated.name - The key where the value should be stored.value - The value to store.PrefService.getList(Class, String)public void remove(Class<?> c, String name)
PrefServicec - The class with which the key is associated.name - The key to remove.public void clear(Class<?> c)
PrefServiceClass's keys from persistent storage.c - The class whose keys should be removed.public void clearAll()
PrefService@Deprecated public void putMap(Class<?> c, Map<String,String> map)
@Deprecated public Map<String,String> getMap(Class<?> c)
@Deprecated public void putList(Class<?> c, List<String> list)
@Deprecated public List<String> getList(Class<?> c)
@Deprecated public Iterable<String> getIterable(Class<?> c, String name)
@Deprecated public void clear(String absolutePath, String key)
@Deprecated public void remove(String absolutePath, String key)
@Deprecated public void putMap(String absolutePath, Map<String,String> map, String key)
@Deprecated public void putMap(String absolutePath, Map<String,String> map)
@Deprecated public void putList(String absolutePath, List<String> list, String key)
@Deprecated public void putList(String absolutePath, List<String> list)
@Deprecated public List<String> getList(String absolutePath, String key)
@Deprecated public void clear(Class<?> c, String name)
Copyright © 2015–2022 SciJava. All rights reserved.