public class MapRegistryKey extends RegistryKeyObject
Modifier and Type | Field and Description |
---|---|
protected Map |
list |
protected Vector |
values |
dontCacheData, emptyValuesList, name, path, root
GET_INDEXES, GET_INDEXES_AS_LONGS, OPTION_READ_32_BIT_VALUES_ONLY, OPTION_READ_64_BIT_VALUES_ONLY, SORT_CASE_SENSITIVE, SORT_DESCENDING, SORT_DONT_SORT
Modifier | Constructor and Description |
---|---|
|
MapRegistryKey(String name,
Map list) |
protected |
MapRegistryKey(String name,
String fullPath,
RegistryKeyObject root,
int options) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
createKey(String fullPath)
Override this to create the data that represents a key.
|
boolean |
deleteValue(String name)
Delete a value with the specified name.
|
protected boolean |
doDelete() |
protected RegistryKeyObject |
getNew(String name,
String fullPath,
RegistryKeyObject root,
int options)
You must override this method.
|
protected String[] |
getUnsortedKeyNames() |
Object |
getValue(int index,
StringBuffer valueName)
Get a value at the specified index.
|
Object |
getValue(String valueName)
This returns either a String or a byte array, or an Integer (representing a 32-bit value)
or a StringBuffer for an expanding String or null.
|
int |
getValueCount() |
boolean |
keyExists()
Return true if the key already exists.
|
boolean |
setExpandingString(String name,
String value) |
boolean |
setValue(String name,
byte[] value)
Set a binary data value.
|
boolean |
setValue(String name,
int value)
Set a 32-bit data value in the default little-endian format.
|
boolean |
setValue(String name,
String value)
Set a String value.
|
amRoot, changeOptions, clearKeyNames, createKey, deleteKey, getFullKeyPath, getKeyName, getOrCreate, getParentKey, getRootKey, getSubKey, getSubKey, getSubKeyCount, getSubKeys, keyNamesChanged
protected MapRegistryKey(String name, String fullPath, RegistryKeyObject root, int options)
name
- fullPath
- root
- protected boolean createKey(String fullPath)
createKey
in class RegistryKeyObject
fullPath
- the full path of the key.public int getValueCount()
getValueCount
in interface IRegistryKey
getValueCount
in class RegistryKeyObject
public boolean setExpandingString(String name, String value)
setExpandingString
in interface IRegistryKey
setExpandingString
in class RegistryKeyObject
public boolean setValue(String name, String value)
IRegistryKey
setValue
in interface IRegistryKey
setValue
in class RegistryKeyObject
public boolean setValue(String name, byte[] value)
IRegistryKey
setValue
in interface IRegistryKey
setValue
in class RegistryKeyObject
public boolean setValue(String name, int value)
IRegistryKey
setValue
in interface IRegistryKey
setValue
in class RegistryKeyObject
protected RegistryKeyObject getNew(String name, String fullPath, RegistryKeyObject root, int options)
getNew
in class RegistryKeyObject
name
- the name to display. If this is null the displayed name
defaults to the last section of the path.fullPath
- the full path but not starting with a leading '\'root
- the root for the key.public Object getValue(String valueName)
IRegistryKey
getValue
in interface IRegistryKey
getValue
in class RegistryKeyObject
public Object getValue(int index, StringBuffer valueName) throws IndexOutOfBoundsException
IRegistryKey
getValue
in interface IRegistryKey
getValue
in class RegistryKeyObject
index
- the index of the value.valueName
- a StringBuffer to hold the value name.IndexOutOfBoundsException
- if the index is too high.public boolean deleteValue(String name)
IRegistryKey
deleteValue
in interface IRegistryKey
deleteValue
in class RegistryKeyObject
public boolean keyExists()
IRegistryKey
keyExists
in interface IRegistryKey
keyExists
in class RegistryKeyObject
protected boolean doDelete()
doDelete
in class RegistryKeyObject
protected String[] getUnsortedKeyNames()
getUnsortedKeyNames
in class RegistryKeyObject