public class RhinoConfig extends Object
RhinoProperties default
instance.
Note: Reading a config value only once is a good practice to avoid affecting performance. For example:
private static final boolean XYZ_ENABLED = RhinoConfig.get("rhino.xyz.enabled", false);
| Constructor and Description |
|---|
RhinoConfig() |
| Modifier and Type | Method and Description |
|---|---|
static String |
get(String property)
Returns the property as string with null as default.
|
static boolean |
get(String property,
boolean defaultValue)
Returns the property as boolean.
|
static int |
get(String property,
int defaultValue)
Returns the property as integer.
|
static <T extends Enum<T>> |
get(String property,
T defaultValue)
Returns the property as enum.
|
public static <T extends Enum<T>> T get(String property, T defaultValue)
If the property is set to any of the enum names (case-insensitive), this enum value is
returned, otherwise defaultValue is returned.
Note: defaultValue must be specified to derive the enum class and its values.
public static boolean get(String property, boolean defaultValue)
A property is true, if it is either Boolean.TRUE or if and only if the string
representation is equal to "true" (case-insensitive). If the property is not set,
defaultValue is returned
Same behaviour as Boolean.getBoolean(String)
public static int get(String property, int defaultValue)
if the property is not set or not a valid integer value, defaultValue is
returned.
Copyright © 2025 HtmlUnit. All rights reserved.