Interface SettingsDefinition
- All Known Subinterfaces:
BooleanSettingsDefinition, EnumSettingsDefinition, NumberSettingsDefinition, StringSettingsDefinition, TypeDefSettingsDefinition
- All Known Implementing Classes:
AddressRangeEndpointSettingsDefinition, AddressSpaceSettingsDefinition, ByteCountSettingsDefinition, CharsetSettingsDefinition, CodeUnitCountSettingsDefinition, CodeUnitOffsetSettingsDefinition, ComponentOffsetSettingsDefinition, DataTypeMnemonicSettingsDefinition, EndianSettingsDefinition, FloatingPointPrecisionSettingsDefinition, FormatSettingsDefinition, FunctionInlineSettingsDefinition, FunctionNoReturnSettingsDefinition, FunctionThunkSettingsDefinition, IntegerSignednessFormattingModeSettingsDefinition, JavaEnumSettingsDefinition, MemoryOffsetSettingsDefinition, MutabilitySettingsDefinition, OffsetMaskSettingsDefinition, OffsetShiftSettingsDefinition, PaddingSettingsDefinition, PointerTypeSettingsDefinition, RenderUnicodeSettingsDefinition, RGB16EncodingSettingsDefinition, RGB32EncodingSettingsDefinition, ShowNamespaceSettingsDefinition, TerminatedSettingsDefinition, TranslationSettingsDefinition
public interface SettingsDefinition
Generic interface for defining display options on data and dataTypes. Uses
Settings objects to store values which are interpreted by SettingsDefinition objects.
-
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves any values in the given settings object associated with this settings definitionstatic SettingsDefinition[]concat(SettingsDefinition[] settings, SettingsDefinition... additional) Create a new list ofSettingsDefinitions by concat'ing a base list with a var-arg'ish additional list of setting defs.voidcopySetting(Settings srcSettings, Settings destSettings) Copies any setting value associated with this settings definition from the srcSettings settings to the destSettings.static SettingsDefinition[]filterSettingsDefinitions(SettingsDefinition[] definitions, Predicate<SettingsDefinition> filter) Get datatype settings definitions for the specified datatype exclusive of any default-use-only definitions.Returns a description of this settings definitiongetName()Returns the display name of this SettingsDefinitionGet theSettingskey which is used when storing a key/value entry.getValueString(Settings settings) Get the setting value as a string which corresponds to this definition.booleanhasSameValue(Settings settings1, Settings settings2) Check two settings for equality which correspond to this settings definition.booleanDetermine if a setting value has been stored
-
Method Details
-
concat
Create a new list ofSettingsDefinitions by concat'ing a base list with a var-arg'ish additional list of setting defs. Any additional duplicates are discarded.- Parameters:
settings- List of settings defs.additional- More settings defs to add- Returns:
- new array with all the settings defs joined together.
-
filterSettingsDefinitions
static SettingsDefinition[] filterSettingsDefinitions(SettingsDefinition[] definitions, Predicate<SettingsDefinition> filter) Get datatype settings definitions for the specified datatype exclusive of any default-use-only definitions.- Parameters:
definitions- settings definitions to be filteredfilter- callback which determines if definition should be included in returned array- Returns:
- filtered settings definitions
-
hasValue
Determine if a setting value has been stored- Parameters:
setting- stored settings- Returns:
- true if a value has been stored, else false
-
getValueString
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.- Parameters:
settings- settings- Returns:
- value string or null if not set and default has not specified by this definition
-
getName
String getName()Returns the display name of this SettingsDefinition- Returns:
- display name for setting
-
getStorageKey
-
getDescription
String getDescription()Returns a description of this settings definition- Returns:
- setting description
-
clear
Removes any values in the given settings object associated with this settings definition- Parameters:
settings- the settings object to be cleared.
-
copySetting
-
hasSameValue
-