public class PropertyUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
propRefPattern |
| Constructor and Description |
|---|
PropertyUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
getBooleanProperty(String key) |
static int |
getIntProperty(String key,
int fallback) |
static String |
getPropertyOrNull(String key) |
static String |
interpolateWithProperties(String original)
Given a string which may contain expressions of the form
${key}, replace each expression with the value corresponding to the
given key in System Properties.
|
static String |
interpolateWithProperties(String original,
Properties... props)
Given a string which may contain expressions of the form
${key}, replace each expression with the value corresponding to the
given key in the supplied Properties instance.
|
protected static String propRefPattern
public static String getPropertyOrNull(String key)
key - Property key.public static boolean getBooleanProperty(String key)
key - Property key.public static int getIntProperty(String key, int fallback)
key - Key to use looking up system property.fallback - If no value found for passed key, return
fallback.fallback.public static String interpolateWithProperties(String original)
original - Stringproperties - Properties to try in order; first value found (if any) is usedpublic static String interpolateWithProperties(String original, Properties... props)
original - Stringprops - Properties to try in order; first value found (if any) is usedCopyright © 2015 The International Internet Preservation Consortium. All Rights Reserved.