Class OptionalBooleanSetting

  • public abstract class OptionalBooleanSetting
    extends OptionalSetting
    Represents an optional setting that can be either enabled or disabled.
    • Constructor Detail

      • OptionalBooleanSetting

        public OptionalBooleanSetting()
    • Method Detail

      • setEnabled

        public abstract void setEnabled​(boolean enabled)
        Sets the setting value.

        This method does nothing in case the setting is already in the specified state.

        enabled - true to enable the setting, false to disable it
      • toggle

        public abstract void toggle()
        Toggles the current setting value, i.e. disables the setting if it is currently enabled, enables it otherwise.
      • isEnabled

        public abstract boolean isEnabled()
        Tells whether the setting is currently enabled, if OptionalValue.isAvailable() returns true, otherwise returned value is undefined.
        true if the setting is enabled, otherwise false