Package ghidra.docking.settings
Interface Settings
- All Known Subinterfaces:
Data
- All Known Implementing Classes:
DataStub
,PseudoData
,SettingsImpl
public interface Settings
Settings objects store name-value pairs. Each SettingsDefinition defines one
or more names to use to store values in settings objects. Exactly what type
of value and how to interpret the value is done by the SettingsDefinition object.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes all name-value pairs from this settings objectvoid
clearSetting
(String name) Removes any value associated with the given nameReturns the underlying default settings for these settings or null if there are noneGets the Long value associated with the given nameString[]
getNames()
Get this list of keys that currently have values associated with themGets the String value associated with the given namedefault String[]
getSuggestedValues
(StringSettingsDefinition settingsDefinition) Get an array of suggested values for the specified string settings definition.Gets the object associated with the given nameboolean
isChangeAllowed
(SettingsDefinition settingsDefinition) Determine if a settings change corresponding to the specified settingsDefinition is permitted.boolean
isEmpty()
Returns true if there are no key-value pairs stored in this settings object.void
Associates the given long value with the name.void
Associates the given String value with the name.void
Associates the given object with the name.
-
Field Details
-
EMPTY_STRING_ARRAY
-
-
Method Details
-
isChangeAllowed
Determine if a settings change corresponding to the specified settingsDefinition is permitted.- Parameters:
settingsDefinition
- settings definition- Returns:
- true if change permitted else false
-
getSuggestedValues
Get an array of suggested values for the specified string settings definition.- Parameters:
settingsDefinition
- string settings definition- Returns:
- suggested values array (may be empty)
-
getLong
Gets the Long value associated with the given name- Parameters:
name
- the key used to retrieve a value- Returns:
- the Long value for a key
-
getString
Gets the String value associated with the given name- Parameters:
name
- the key used to retrieve a value- Returns:
- the String value for a key
-
getValue
Gets the object associated with the given name- Parameters:
name
- the key used to retrieve a value- Returns:
- the object associated with a given key
-
setLong
Associates the given long value with the name. Note that an attempted setting change may be ignored if prohibited (e.g., immutable Settings, undefined setting name).- Parameters:
name
- the keyvalue
- the value associated with the key
-
setString
Associates the given String value with the name. Note that an attempted setting change may be ignored if prohibited (e.g., immutable Settings, undefined setting name).- Parameters:
name
- the keyvalue
- the value associated with the key
-
setValue
Associates the given object with the name. Note that an attempted setting change may be ignored if prohibited (e.g., immutable Settings, undefined setting name).- Parameters:
name
- the keyvalue
- the value to associate with the key
-
clearSetting
Removes any value associated with the given name- Parameters:
name
- the key to remove any association
-
clearAllSettings
void clearAllSettings()Removes all name-value pairs from this settings object -
getNames
String[] getNames()Get this list of keys that currently have values associated with them- Returns:
- an array of string keys.
-
isEmpty
boolean isEmpty()Returns true if there are no key-value pairs stored in this settings object. This is not a reflection of the underlying default settings which may still contain a key-value pair when this settings object is empty.- Returns:
- true if there are no key-value pairs stored in this settings object
-
getDefaultSettings
Settings getDefaultSettings()Returns the underlying default settings for these settings or null if there are none- Returns:
- underlying default settings or null
-