public interface Settings
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
asMap() |
Boolean |
getBoolean(String key) |
boolean |
getBoolean(String key,
boolean defaultValue) |
Double |
getDouble(String key) |
double |
getDouble(String key,
double defaultValue) |
Integer |
getInt(String key) |
int |
getInt(String key,
int defaultValue) |
Long |
getLong(String key) |
long |
getLong(String key,
long defaultValue) |
String |
getString(String key) |
String |
getString(String key,
String defaultValue) |
@Nullable String getString(@Nonnull String key)
key
- of the setting to lookupString
contained under this setting key or null
ClassCastException
- is the underlying setting is not a String
@Nonnull String getString(@Nonnull String key, @Nonnull String defaultValue)
key
- of the setting to lookupdefaultValue
- the default value if the value isn't presentString
contained under this setting key or the defaultClassCastException
- is the underlying setting is not a String
@Nullable Boolean getBoolean(@Nonnull String key)
key
- of the setting to lookupBoolean
contained under this setting key, if the String value equals "true", or null
boolean getBoolean(@Nonnull String key, boolean defaultValue)
key
- of the setting to lookupdefaultValue
- the default value if the value isn't presentboolean
contained under this setting key, if the String value equals "true", or the default@Nullable Integer getInt(@Nonnull String key)
key
- of the setting to lookupInteger
contained under this setting key, a parsed representation of the String, or null
NumberFormatException
- if the resulting string is not a legal intint getInt(@Nonnull String key, int defaultValue)
key
- of the setting to lookupdefaultValue
- the default value if the value isn't presentint
contained under this setting key, a parsed representation of the String, or the defaultNumberFormatException
- if the resulting string is not a legal int@Nullable Long getLong(@Nonnull String key)
key
- of the setting to lookupLong
contained under this setting key, a parsed representation of the String, or null
NumberFormatException
- if the resulting string is not a legal longlong getLong(@Nonnull String key, long defaultValue)
key
- of the setting to lookupdefaultValue
- the default value if the value isn't presentlong
contained under this setting key, a parsed representation of the String, or the defaultNumberFormatException
- if the resulting string is not a legal long@Nullable Double getDouble(@Nonnull String key)
key
- of the setting to lookupDouble
contained under this setting key, a parsed representation of the String, or null
NumberFormatException
- if the resulting string is not a legal doubledouble getDouble(@Nonnull String key, double defaultValue)
key
- of the setting to lookupdefaultValue
- the default value if the value isn't presentdouble
contained under this setting key, a parsed representation of the String, or the defaultNumberFormatException
- if the resulting string is not a legal doubleCopyright © 2020 Atlassian. All rights reserved.