public class ConfigUtils extends Object
| Constructor and Description |
|---|
ConfigUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
getAsBoolean(String key,
boolean defaultValue)
Retrieves the specified configuration value as a boolean.
|
static float |
getAsFloat(String key,
float defaultValue)
Retrieves the specified configuration value as a float.
|
static int |
getAsInt(String key,
int defaultValue)
Retrieves the specified configuration value as an int.
|
static List<Map<String,String>> |
getAsList(String key)
Retrieves the specified configuration value as an array.
|
static Map<String,String> |
getAsMap(String key)
Retrieves the specified configuration value as a map.
|
static String |
getAsString(String key,
String defaultValue)
Retrieves the specified configuration value as a string.
|
public static String getAsString(String key, String defaultValue)
key - The configuration to be retrieved.defaultValue - The default value to be use in case there is no mapping for the provided key.public static int getAsInt(String key, int defaultValue)
key - The configuration to be retrieved.defaultValue - The default value to be use in case there is no mapping for the provided key.public static boolean getAsBoolean(String key, boolean defaultValue)
key - The configuration to be retrieved.defaultValue - The default value to be use in case there is no mapping for the provided key.public static float getAsFloat(String key, float defaultValue)
key - The configuration to be retrieved.defaultValue - The default value to be use in case there is no mapping for the provided key.public static Map<String,String> getAsMap(String key)
key - The configuration to be retrieved.Copyright © 2021 WSO2. All rights reserved.