public class PropertiesUtil extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
getBoolean(Properties config,
String key,
boolean defaultValue)
Get boolean from properties.
|
static int |
getInt(Properties config,
String key,
int defaultValue)
Get integer from properties.
|
static long |
getLong(Properties config,
String key,
long defaultValue)
Get long from properties.
|
static long |
getLong(Properties config,
String key,
long defaultValue,
org.slf4j.Logger logger)
Get long from properties.
|
public static int getInt(Properties config, String key, int defaultValue)
config
- Propertieskey
- key in PropertiesdefaultValue
- default value if value is not setpublic static long getLong(Properties config, String key, long defaultValue)
config
- Propertieskey
- key in PropertiesdefaultValue
- default value if value is not setpublic static long getLong(Properties config, String key, long defaultValue, org.slf4j.Logger logger)
config
- Propertieskey
- key in PropertiesdefaultValue
- default value if value is not setpublic static boolean getBoolean(Properties config, String key, boolean defaultValue)
true
iff the parsed value is "true".config
- Propertieskey
- key in PropertiesdefaultValue
- default value if value is not setCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.