Package net.sf.gridarta.preferences
Class FilePreferences
- java.lang.Object
-
- java.util.prefs.Preferences
-
- java.util.prefs.AbstractPreferences
-
- net.sf.gridarta.preferences.FilePreferences
-
- Direct Known Subclasses:
FilePreferencesNode
public abstract class FilePreferences extends java.util.prefs.AbstractPreferencesImplements aPreferencesthat stores all values in aStorageinstance.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFilePreferences(@Nullable java.util.prefs.AbstractPreferences parent, @NotNull java.lang.String name, @NotNull NodeType nodeType, @NotNull Storage storage)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected @NotNull java.lang.String @NotNull []childrenNamesSpi()protected java.util.prefs.AbstractPreferenceschildSpi(@NotNull java.lang.String name)voidflush()protected voidflushSpi()@Nullable java.lang.Stringget(@NotNull java.lang.String key, @Nullable java.lang.String def)booleangetBoolean(@NotNull java.lang.String key, boolean def)doublegetDouble(@NotNull java.lang.String key, double def)floatgetFloat(@NotNull java.lang.String key, float def)intgetInt(@NotNull java.lang.String key, int def)longgetLong(@NotNull java.lang.String key, long def)protected @Nullable java.lang.StringgetSpi(@NotNull java.lang.String key)protected @NotNull StoragegetStorage()Returns the storage instance used for loading/saving values.protected @NotNull java.lang.String @NotNull []keysSpi()protected voidputSpi(@NotNull java.lang.String key, @NotNull java.lang.String value)protected voidremoveNodeSpi()protected voidremoveSpi(@NotNull java.lang.String key)voidsync()protected voidsyncSpi()-
Methods inherited from class java.util.prefs.AbstractPreferences
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
-
-
-
-
Constructor Detail
-
FilePreferences
protected FilePreferences(@Nullable @Nullable java.util.prefs.AbstractPreferences parent, @NotNull @NotNull java.lang.String name, @NotNull @NotNull NodeType nodeType, @NotNull @NotNull Storage storage)Creates a new instance.- Parameters:
parent- the parent node, ornullif 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
-
-
Method Detail
-
getStorage
@NotNull protected @NotNull Storage getStorage()
Returns the storage instance used for loading/saving values.- Returns:
- the storage instance
-
childrenNamesSpi
@NotNull protected @NotNull java.lang.String @NotNull [] childrenNamesSpi()
- Specified by:
childrenNamesSpiin classjava.util.prefs.AbstractPreferences
-
childSpi
protected java.util.prefs.AbstractPreferences childSpi(@NotNull @NotNull java.lang.String name)- Specified by:
childSpiin classjava.util.prefs.AbstractPreferences
-
flushSpi
protected void flushSpi()
- Specified by:
flushSpiin classjava.util.prefs.AbstractPreferences
-
flush
public void flush() throws java.util.prefs.BackingStoreException- Overrides:
flushin classjava.util.prefs.AbstractPreferences- Throws:
java.util.prefs.BackingStoreException- No Inspection:
- RefusedBequest
-
get
@Nullable public @Nullable java.lang.String get(@NotNull @NotNull java.lang.String key, @Nullable @Nullable java.lang.String def)- Overrides:
getin classjava.util.prefs.AbstractPreferences- No Inspection:
- RefusedBequest
-
getBoolean
public boolean getBoolean(@NotNull @NotNull java.lang.String key, boolean def)- Overrides:
getBooleanin classjava.util.prefs.AbstractPreferences
-
getDouble
public double getDouble(@NotNull @NotNull java.lang.String key, double def)- Overrides:
getDoublein classjava.util.prefs.AbstractPreferences
-
getFloat
public float getFloat(@NotNull @NotNull java.lang.String key, float def)- Overrides:
getFloatin classjava.util.prefs.AbstractPreferences
-
getInt
public int getInt(@NotNull @NotNull java.lang.String key, int def)- Overrides:
getIntin classjava.util.prefs.AbstractPreferences
-
getLong
public long getLong(@NotNull @NotNull java.lang.String key, long def)- Overrides:
getLongin classjava.util.prefs.AbstractPreferences
-
getSpi
@Nullable protected @Nullable java.lang.String getSpi(@NotNull @NotNull java.lang.String key)- Specified by:
getSpiin classjava.util.prefs.AbstractPreferences
-
keysSpi
@NotNull protected @NotNull java.lang.String @NotNull [] keysSpi()
- Specified by:
keysSpiin classjava.util.prefs.AbstractPreferences
-
putSpi
protected void putSpi(@NotNull @NotNull java.lang.String key, @NotNull @NotNull java.lang.String value)- Specified by:
putSpiin classjava.util.prefs.AbstractPreferences
-
removeNodeSpi
protected void removeNodeSpi()
- Specified by:
removeNodeSpiin classjava.util.prefs.AbstractPreferences
-
removeSpi
protected void removeSpi(@NotNull @NotNull java.lang.String key)- Specified by:
removeSpiin classjava.util.prefs.AbstractPreferences
-
syncSpi
protected void syncSpi()
- Specified by:
syncSpiin classjava.util.prefs.AbstractPreferences
-
sync
public void sync() throws java.util.prefs.BackingStoreException- Overrides:
syncin classjava.util.prefs.AbstractPreferences- Throws:
java.util.prefs.BackingStoreException- No Inspection:
- RefusedBequest
-
-