public class PropertiesUtil
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
getBoolean(java.util.Properties config,
java.lang.String key,
boolean defaultValue)
Get boolean from properties.
|
static int |
getInt(java.util.Properties config,
java.lang.String key,
int defaultValue)
Get integer from properties.
|
static long |
getLong(java.util.Properties config,
java.lang.String key,
long defaultValue)
Get long from properties.
|
static long |
getLong(java.util.Properties config,
java.lang.String key,
long defaultValue,
org.slf4j.Logger logger)
Get long from properties.
|
public static int getInt(java.util.Properties config,
java.lang.String key,
int defaultValue)
config - Propertieskey - key in PropertiesdefaultValue - default value if value is not setpublic static long getLong(java.util.Properties config,
java.lang.String key,
long defaultValue)
config - Propertieskey - key in PropertiesdefaultValue - default value if value is not setpublic static long getLong(java.util.Properties config,
java.lang.String key,
long defaultValue,
org.slf4j.Logger logger)
config - Propertieskey - key in PropertiesdefaultValue - default value if value is not setpublic static boolean getBoolean(java.util.Properties config,
java.lang.String key,
boolean defaultValue)
true iff the parsed value is "true".config - Propertieskey - key in PropertiesdefaultValue - default value if value is not set