public abstract class FilePreferences
extends java.util.prefs.AbstractPreferences
Preferences
that stores all values in a Storage
instance.Modifier | Constructor and Description |
---|---|
protected |
FilePreferences(@Nullable java.util.prefs.AbstractPreferences parent,
@NotNull java.lang.String name,
@NotNull NodeType nodeType,
@NotNull Storage storage)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected @NotNull java.lang.String[] |
childrenNamesSpi() |
protected java.util.prefs.AbstractPreferences |
childSpi(@NotNull java.lang.String name) |
void |
flush() |
protected void |
flushSpi() |
@Nullable java.lang.String |
get(@NotNull java.lang.String key,
@Nullable java.lang.String def) |
boolean |
getBoolean(@NotNull java.lang.String key,
boolean def) |
double |
getDouble(@NotNull java.lang.String key,
double def) |
float |
getFloat(@NotNull java.lang.String key,
float def) |
int |
getInt(@NotNull java.lang.String key,
int def) |
long |
getLong(@NotNull java.lang.String key,
long def) |
protected @Nullable java.lang.String |
getSpi(@NotNull java.lang.String key) |
protected @NotNull Storage |
getStorage()
Returns the storage instance used for loading/saving values.
|
protected @NotNull java.lang.String[] |
keysSpi() |
protected void |
putSpi(@NotNull java.lang.String key,
@NotNull java.lang.String value) |
protected void |
removeNodeSpi() |
protected void |
removeSpi(@NotNull java.lang.String key) |
void |
sync() |
protected void |
syncSpi() |
absolutePath, addNodeChangeListener, addPreferenceChangeListener, cachedChildren, childrenNames, clear, exportNode, exportSubtree, getByteArray, getChild, isRemoved, isUserNode, keys, name, node, nodeExists, parent, put, putBoolean, putByteArray, putDouble, putFloat, putInt, putLong, remove, removeNode, removeNodeChangeListener, removePreferenceChangeListener, toString
protected FilePreferences(@Nullable @Nullable java.util.prefs.AbstractPreferences parent, @NotNull @NotNull java.lang.String name, @NotNull @NotNull NodeType nodeType, @NotNull @NotNull Storage storage)
parent
- the parent node, or null
if this node is the root
nodename
- the name of this nodenodeType
- the node type of this nodestorage
- the storage instance used for loading/saving values@NotNull protected @NotNull Storage getStorage()
@NotNull protected @NotNull java.lang.String[] childrenNamesSpi()
childrenNamesSpi
in class java.util.prefs.AbstractPreferences
protected java.util.prefs.AbstractPreferences childSpi(@NotNull @NotNull java.lang.String name)
childSpi
in class java.util.prefs.AbstractPreferences
protected void flushSpi()
flushSpi
in class java.util.prefs.AbstractPreferences
public void flush() throws java.util.prefs.BackingStoreException
flush
in class java.util.prefs.AbstractPreferences
java.util.prefs.BackingStoreException
@Nullable public @Nullable java.lang.String get(@NotNull @NotNull java.lang.String key, @Nullable @Nullable java.lang.String def)
get
in class java.util.prefs.AbstractPreferences
public boolean getBoolean(@NotNull @NotNull java.lang.String key, boolean def)
getBoolean
in class java.util.prefs.AbstractPreferences
public double getDouble(@NotNull @NotNull java.lang.String key, double def)
getDouble
in class java.util.prefs.AbstractPreferences
public float getFloat(@NotNull @NotNull java.lang.String key, float def)
getFloat
in class java.util.prefs.AbstractPreferences
public int getInt(@NotNull @NotNull java.lang.String key, int def)
getInt
in class java.util.prefs.AbstractPreferences
public long getLong(@NotNull @NotNull java.lang.String key, long def)
getLong
in class java.util.prefs.AbstractPreferences
@Nullable protected @Nullable java.lang.String getSpi(@NotNull @NotNull java.lang.String key)
getSpi
in class java.util.prefs.AbstractPreferences
@NotNull protected @NotNull java.lang.String[] keysSpi()
keysSpi
in class java.util.prefs.AbstractPreferences
protected void putSpi(@NotNull @NotNull java.lang.String key, @NotNull @NotNull java.lang.String value)
putSpi
in class java.util.prefs.AbstractPreferences
protected void removeNodeSpi()
removeNodeSpi
in class java.util.prefs.AbstractPreferences
protected void removeSpi(@NotNull @NotNull java.lang.String key)
removeSpi
in class java.util.prefs.AbstractPreferences
protected void syncSpi()
syncSpi
in class java.util.prefs.AbstractPreferences
public void sync() throws java.util.prefs.BackingStoreException
sync
in class java.util.prefs.AbstractPreferences
java.util.prefs.BackingStoreException