Interface SettingsBuilder


public interface SettingsBuilder
A builder for Settings
See Also:
  • Method Details

    • add

      @Nonnull SettingsBuilder add(@Nonnull String key, @Nonnull String value)
      Add an entry to the settings
      Parameters:
      key - the key of the setting
      value - the value of the setting
      Returns:
      this
    • add

      @Nonnull SettingsBuilder add(@Nonnull String key, boolean value)
      Add an entry to the settings
      Parameters:
      key - the key of the setting
      value - the value of the setting
      Returns:
      this
    • add

      @Nonnull SettingsBuilder add(@Nonnull String key, int value)
      Add an entry to the settings
      Parameters:
      key - the key of the setting
      value - the value of the setting
      Returns:
      this
    • add

      @Nonnull SettingsBuilder add(@Nonnull String key, long value)
      Add an entry to the settings
      Parameters:
      key - the key of the setting
      value - the value of the setting
      Returns:
      this
    • add

      @Nonnull SettingsBuilder add(@Nonnull String key, double value)
      Add an entry to the settings
      Parameters:
      key - the key of the setting
      value - the value of the setting
      Returns:
      this
    • addAll

      @Nonnull SettingsBuilder addAll(@Nonnull Map<String,?> values)
      Add all entries in the Map of values.

      Only maps with entries which could be manually via one of the add(key, value) methods are acceptable.

      Parameters:
      values - the map of values
      Returns:
      this.
      Throws:
      IllegalArgumentException - if any of the entries are unacceptable
    • addAll

      @Nonnull SettingsBuilder addAll(@Nonnull Settings settings)
      Add all the Settings
      Parameters:
      settings - the settings instance
      Returns:
      this
      Throws:
      IllegalArgumentException - if any of the entries are unacceptable
    • build

      @Nonnull Settings build()
      Returns:
      the newly created Settings instance