public interface

SettingsBuilder

com.atlassian.bitbucket.setting.SettingsBuilder

Class Overview

A builder for Settings

Summary

Public Methods
@Nonnull SettingsBuilder add(String key, boolean value)
@Nonnull SettingsBuilder add(String key, int value)
@Nonnull SettingsBuilder add(String key, long value)
@Nonnull SettingsBuilder add(String key, String value)
Add an entry to the settings
@Nonnull SettingsBuilder add(String key, double value)
@Nonnull SettingsBuilder addAll(Map<String, ?> values)
Add all entries in the Map of values.
@Nonnull SettingsBuilder addAll(Settings settings)
Add all the Settings
@Nonnull Settings build()

Public Methods

@Nonnull public SettingsBuilder add (String key, boolean value)

@Nonnull public SettingsBuilder add (String key, int value)

@Nonnull public SettingsBuilder add (String key, long value)

@Nonnull public SettingsBuilder add (String key, String value)

Add an entry to the settings

Parameters
key the key of the setting
value the value of the setting
Returns
  • the builder

@Nonnull public SettingsBuilder add (String key, double value)

@Nonnull public SettingsBuilder addAll (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
  • the builder.
Throws
IllegalArgumentException if any of the entries are unacceptable

@Nonnull public SettingsBuilder addAll (Settings settings)

Add all the Settings

Parameters
settings the settings instance
Returns
  • the builder
Throws
IllegalArgumentException if any of the entries are unacceptable

@Nonnull public Settings build ()

Returns