Package ghidra.docking.settings
Interface NumberSettingsDefinition
- All Superinterfaces:
SettingsDefinition
- All Known Implementing Classes:
ComponentOffsetSettingsDefinition
,OffsetMaskSettingsDefinition
,OffsetShiftSettingsDefinition
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine if negative values are permitted.Get the maximum value permitted.long
Gets the value for this SettingsDefinition given a Settings object.default String
getValueString
(Settings settings) Get the setting value as a string which corresponds to this definition.default boolean
hasSameValue
(Settings settings1, Settings settings2) Check two settings for equality which correspond to this settings definition.boolean
Determine if hexidecimal entry/display is preferred due to the nature of the setting (e.g., mask)void
Sets the given value into the given settings object using this settingsDefinition as the key.Methods inherited from interface ghidra.docking.settings.SettingsDefinition
clear, copySetting, getDescription, getName, getStorageKey, hasValue
-
Method Details
-
getValue
Gets the value for this SettingsDefinition given a Settings object.- Parameters:
settings
- the set of Settings values for a particular location or null for default value.- Returns:
- the value for this settings object given the context.
-
setValue
Sets the given value into the given settings object using this settingsDefinition as the key.- Parameters:
settings
- the settings object to store the value in.value
- the value to store in the settings object using this settingsDefinition as the key.
-
getMaxValue
BigInteger getMaxValue()Get the maximum value permitted. The absolute value of the setting may not exceed this value.- Returns:
- maximum value permitted
-
allowNegativeValue
boolean allowNegativeValue()Determine if negative values are permitted.- Returns:
- true if negative values are permitted, else false.
-
isHexModePreferred
boolean isHexModePreferred()Determine if hexidecimal entry/display is preferred due to the nature of the setting (e.g., mask)- Returns:
- true if hex preferred over decimal, else false
-
getValueString
Description copied from interface:SettingsDefinition
Get the setting value as a string which corresponds to this definition. A default value string will be returned if a setting has not been stored.- Specified by:
getValueString
in interfaceSettingsDefinition
- Parameters:
settings
- settings- Returns:
- value string or null if not set and default has not specified by this definition
-
hasSameValue
Description copied from interface:SettingsDefinition
Check two settings for equality which correspond to this settings definition.- Specified by:
hasSameValue
in interfaceSettingsDefinition
- Parameters:
settings1
- first settingssettings2
- second settings- Returns:
- true if the same else false
-