public static class DefaultUserSettings.Builder extends Object implements UserSettingsBuilder
Modifier and Type | Method and Description |
---|---|
UserSettings |
build() |
com.atlassian.fugue.Option<Object> |
get(String key) |
Set<String> |
getKeys() |
UserSettingsBuilder |
put(String key,
boolean value)
add an extra entry to the builder, overwriting any existing value stored against key (regardless of type)
|
UserSettingsBuilder |
put(String key,
long value)
add an extra entry to the builder, overwriting any existing value stored against key (regardless of type)
|
UserSettingsBuilder |
put(String key,
String value)
add an extra entry to the builder, overwriting any existing value stored against key (regardless of type)
|
UserSettingsBuilder |
remove(String key)
remove an entry from the builder
|
public UserSettingsBuilder put(String key, String value)
UserSettingsBuilder
put
in interface UserSettingsBuilder
key
- the key to store the value againstvalue
- the non-null String to store, length cannot be longer than UserSettingsService.MAX_KEY_LENGTH
public UserSettingsBuilder put(String key, boolean value)
UserSettingsBuilder
put
in interface UserSettingsBuilder
key
- the key to store the value againstvalue
- the boolean to storepublic UserSettingsBuilder put(String key, long value)
UserSettingsBuilder
put
in interface UserSettingsBuilder
key
- the key to store the value againstvalue
- the long to storepublic UserSettingsBuilder remove(String key)
UserSettingsBuilder
remove
in interface UserSettingsBuilder
key
- the key for the entry to removepublic com.atlassian.fugue.Option<Object> get(String key)
get
in interface UserSettingsBuilder
key
- the setting key being queriedSome
containing the value stored against key if one exists, a Option.none()
otherwise. Values can be of type String, Boolean or Long.public Set<String> getKeys()
getKeys
in interface UserSettingsBuilder
public UserSettings build()
build
in interface UserSettingsBuilder
Copyright © 2015 Atlassian. All rights reserved.