| Modifier and Type | Field and Description |
|---|---|
static Configuration |
NONE
Noop Configuration object used to opt out of using global configurations when constructing client libraries.
|
| Constructor and Description |
|---|
Configuration()
Constructs an empty configuration.
|
| Modifier and Type | Method and Description |
|---|---|
Configuration |
clone() |
boolean |
contains(String name)
Determines if the configuration exists.
|
String |
get(String name)
Gets the value of the configuration.
|
<T> T |
get(String name,
Function<String,T> converter)
Gets the converted value of the configuration.
|
<T> T |
get(String name,
T defaultValue)
Gets the value of the configuration converted to
T. |
Configuration |
put(String name,
String value)
Adds a configuration with the given value.
|
String |
remove(String name)
Removes the configuration.
|
public static final Configuration NONE
public String get(String name)
name - Name of the configuration.public <T> T get(String name, T defaultValue)
T.
If no configuration is found the default is returned.T - Generic type that the configuration is converted to if found.name - Name of the configuration.defaultValue - Value to return if the configuration isn't found.public <T> T get(String name, Function<String,T> converter)
T - Generic type that the configuration is converted to if found.name - Name of the configuration.converter - Converter used to map the configuration to T.public Configuration put(String name, String value)
name - Name of the configuration.value - Value of the configuration.public String remove(String name)
name - Name of the configuration.public boolean contains(String name)
name - Name of the configuration.public Configuration clone()
Copyright © 2019 Microsoft Corporation. All rights reserved.