public final class PropertyUtils
extends java.lang.Object
| Constructor and Description |
|---|
PropertyUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clear(java.lang.String key)
Clears a System property prepended with "optimizely.".
|
static java.lang.String |
get(java.lang.String key)
Get a configuration value from one of the supported locations.
|
static java.lang.String |
get(java.lang.String key,
java.lang.String dafault)
Get a configuration value from one of the supported locations.
|
static <T> T |
getEnum(java.lang.String key,
java.lang.Class<T> clazz)
Get a configuration value as Enum from one of the supported locations.
|
static <T> T |
getEnum(java.lang.String key,
java.lang.Class<T> clazz,
T dafault)
Get a configuration value as Enum from one of the supported locations.
|
static java.lang.Integer |
getInteger(java.lang.String key)
Get a configuration value as Integer from one of the supported locations.
|
static java.lang.Integer |
getInteger(java.lang.String key,
java.lang.Integer dafault)
Get a configuration value as Integer from one of the supported locations.
|
static java.lang.Long |
getLong(java.lang.String key)
Get a configuration value as Long from one of the supported locations.
|
static java.lang.Long |
getLong(java.lang.String key,
java.lang.Long dafault)
Get a configuration value as Long from one of the supported locations.
|
static void |
set(java.lang.String key,
java.lang.String value)
Sets a System property prepended with "optimizely.".
|
public static void clear(java.lang.String key)
key - The configuration keypublic static void set(java.lang.String key,
java.lang.String value)
key - The configuration keyvalue - The String valuepublic static java.lang.String get(java.lang.String key)
key - The configuration keypublic static java.lang.String get(java.lang.String key,
java.lang.String dafault)
key - The configuration keydafault - The default valuepublic static java.lang.Long getLong(java.lang.String key)
key - The configuration keypublic static java.lang.Long getLong(java.lang.String key,
java.lang.Long dafault)
key - The configuration keydafault - The default valuepublic static java.lang.Integer getInteger(java.lang.String key)
key - The configuration keypublic static java.lang.Integer getInteger(java.lang.String key,
java.lang.Integer dafault)
key - The configuration keydafault - The default valuepublic static <T> T getEnum(java.lang.String key,
java.lang.Class<T> clazz)
T - This is the type parameterkey - The configuration keyclazz - The value classpublic static <T> T getEnum(java.lang.String key,
java.lang.Class<T> clazz,
T dafault)
T - This is the type parameterkey - The configuration keyclazz - The value classdafault - The default value