public interface

SettingsBuilder

com.atlassian.stash.setting.SettingsBuilder

Class Overview

A builder for Settings

See Also
  • {@link com.atlassian.stash.hook.repository.RepositoryHookService#createSettingsBuilder()}

Summary

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

Public Methods

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

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

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

@Nonnull public SettingsBuilder add (String key, boolean 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 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 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 Settings build ()

Returns