public class PropertiesUtil extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
getBooleanProperty(ApplicationProperties applicationProperties,
String propertyKey,
boolean defaultValue)
Utility method for getting parameters.
|
static int |
getIntProperty(ApplicationProperties applicationProperties,
String propertyKey,
int defaultValue)
Utility method for getting parameters.
|
public static int getIntProperty(ApplicationProperties applicationProperties, String propertyKey, int defaultValue)
Parses the defined application property to an int if possible. If the defined value is missing or invalid, then it returns the given defaultValue instead.
applicationProperties
- application propertiesdefaultValue
- The default value to use if we can't find an int for the given key.propertyKey
- property keypublic static boolean getBooleanProperty(ApplicationProperties applicationProperties, String propertyKey, boolean defaultValue)
Parses the defined application property to a boolean if possible. If the defined value is missing or invalid, then it returns the given defaultValue instead.
applicationProperties
- application propertiesdefaultValue
- The default value to use if we can't find a boolean for the given key.propertyKey
- property keyCopyright © 2002-2016 Atlassian. All Rights Reserved.