Package rs.baselib.prefs
Class Preferences
java.lang.Object
rs.baselib.prefs.AbstractPreferences
rs.baselib.prefs.Preferences
- All Implemented Interfaces:
IPropertyChangeProvider,IPreferences
public class Preferences extends AbstractPreferences
Default implementation of preferences.
- Author:
- ralph
-
Field Summary
Fields inherited from interface rs.baselib.prefs.IPreferences
CHILD_ADDED, CHILD_REMOVED, VALUES_CLEARED -
Constructor Summary
Constructors Constructor Description Preferences(AbstractPreferences parent, java.lang.String name)Constructor. -
Method Summary
Modifier and Type Method Description protected AbstractPreferencescreateNode(AbstractPreferences parent, java.lang.String name)Subclasses must implement this to return a new child node.protected java.util.concurrent.locks.LockcreateReadLock()Creates the appropriate read lock object.protected java.util.concurrent.locks.LockcreateWriteLock()Creates the appropriate write lock object.protected AbstractPreferencesServicegetPreferencesService()Returns the preferences service.Methods inherited from class rs.baselib.prefs.AbstractPreferences
absolutePath, addNode, addPropertyChangeListener, addPropertyChangeListener, childrenNames, clear, firePropertyChange, firePropertyChange, flush, get, getBoolean, getByteArray, getDouble, getFloat, getInt, getLong, getReadLock, getRootNode, getWriteLock, isAbsolute, isRelative, isRootNode, keys, name, node, nodeExists, parent, put, putBoolean, putByteArray, putDouble, putFloat, putInt, putLong, readLock, readUnlock, remove, removeNode, removeNode, removePropertyChangeListener, removePropertyChangeListener, sync, writeLock, writeUnlock
-
Constructor Details
-
Preferences
Constructor.- Parameters:
parent- the parent preferencesname- the nam eof this preference object
-
-
Method Details
-
createNode
Subclasses must implement this to return a new child node.- Specified by:
createNodein classAbstractPreferences- Parameters:
parent- the parent to be usedname- the name to be used- Returns:
- the new node
-
getPreferencesService
Returns the preferences service.- Specified by:
getPreferencesServicein classAbstractPreferences- Returns:
- the preferences service
-
createReadLock
protected java.util.concurrent.locks.Lock createReadLock()Creates the appropriate read lock object.- Specified by:
createReadLockin classAbstractPreferences- Returns:
- the read lock object
-
createWriteLock
protected java.util.concurrent.locks.Lock createWriteLock()Creates the appropriate write lock object.- Specified by:
createWriteLockin classAbstractPreferences- Returns:
- the write lock object
-