Interface EnumSettingsDefinition

All Superinterfaces:
SettingsDefinition
All Known Implementing Classes:
AddressRangeEndpointSettingsDefinition, ByteCountSettingsDefinition, CharsetSettingsDefinition, CodeUnitCountSettingsDefinition, CodeUnitOffsetSettingsDefinition, DataTypeMnemonicSettingsDefinition, EndianSettingsDefinition, FloatingPointPrecisionSettingsDefinition, FormatSettingsDefinition, IntegerSignednessFormattingModeSettingsDefinition, JavaEnumSettingsDefinition, MemoryOffsetSettingsDefinition, MutabilitySettingsDefinition, PaddingSettingsDefinition, PointerTypeSettingsDefinition, RenderUnicodeSettingsDefinition, TerminatedSettingsDefinition, TranslationSettingsDefinition

public interface EnumSettingsDefinition extends SettingsDefinition
Interface for a SettingsDefinition with enumerated values.
  • Method Details

    • getChoice

      int getChoice(Settings settings)
      Returns the current value for this settings
      Parameters:
      settings - The settings to search
      Returns:
      the value for the settingsDefintions
    • setChoice

      void setChoice(Settings settings, int value)
      Sets the given value into the settings object using this definition as a key
      Parameters:
      settings - the settings to store the value.
      value - the settings value to be stored.
    • getDisplayChoice

      String getDisplayChoice(int value, Settings settings)
      Returns the String for the given enum value
      Parameters:
      value - the value to get a display string for
      settings - the instance settings which may affect the results
      Returns:
      the display string for the given settings.
    • getDisplayChoices

      String[] getDisplayChoices(Settings settings)
      Gets the list of choices as strings based on the current settings
      Parameters:
      settings - the instance settings
      Returns:
      an array of strings which represent valid choices based on the current settings.
    • hasSameValue

      default boolean hasSameValue(Settings settings1, Settings settings2)
      Description copied from interface: SettingsDefinition
      Check two settings for equality which correspond to this settings definition.
      Specified by:
      hasSameValue in interface SettingsDefinition
      Parameters:
      settings1 - first settings
      settings2 - second settings
      Returns:
      true if the same else false