Interface NumberSettingsDefinition

All Superinterfaces:
SettingsDefinition
All Known Implementing Classes:
ComponentOffsetSettingsDefinition, OffsetMaskSettingsDefinition, OffsetShiftSettingsDefinition

public interface NumberSettingsDefinition extends SettingsDefinition
  • Method Details

    • getValue

      long getValue(Settings settings)
      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

      void setValue(Settings settings, long value)
      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

      default String getValueString(Settings settings)
      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 interface SettingsDefinition
      Parameters:
      settings - settings
      Returns:
      value string or null if not set and default has not specified by this definition
    • 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