public class PropertiesUtil extends Object
Modifier and Type | Method and Description |
---|---|
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 setIllegalArgumentException
public static long getLong(Properties config, String key, long defaultValue)
config
- Propertieskey
- key in PropertiesdefaultValue
- default value if value is not setIllegalArgumentException
public static long getLong(Properties config, String key, long defaultValue, org.slf4j.Logger logger)
config
- Propertieskey
- key in PropertiesdefaultValue
- default value if value is not setIllegalArgumentException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.