public class PropUtil
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
PropUtil() |
Modifier and Type | Method and Description |
---|---|
private static boolean |
getBoolean(java.lang.Object value,
boolean def)
Interpret the value object as a boolean,
returning def if unable.
|
static boolean |
getBooleanProperty(java.util.Properties props,
java.lang.String name,
boolean def)
Get a boolean valued property.
|
static boolean |
getBooleanSessionProperty(Session session,
java.lang.String name,
boolean def)
Deprecated.
|
static boolean |
getBooleanSystemProperty(java.lang.String name,
boolean def)
Get a boolean valued System property.
|
private static int |
getInt(java.lang.Object value,
int def)
Interpret the value object as an integer,
returning def if unable.
|
static int |
getIntProperty(java.util.Properties props,
java.lang.String name,
int def)
Get an integer valued property.
|
static int |
getIntSessionProperty(Session session,
java.lang.String name,
int def)
Deprecated.
|
private static java.lang.Object |
getProp(java.util.Properties props,
java.lang.String name)
Get the value of the specified property.
|
public static int getIntProperty(java.util.Properties props, java.lang.String name, int def)
props
- the propertiesname
- the property namedef
- default value if property not foundpublic static boolean getBooleanProperty(java.util.Properties props, java.lang.String name, boolean def)
props
- the propertiesname
- the property namedef
- default value if property not found@Deprecated public static int getIntSessionProperty(Session session, java.lang.String name, int def)
session
- the Sessionname
- the property namedef
- default value if property not found@Deprecated public static boolean getBooleanSessionProperty(Session session, java.lang.String name, boolean def)
session
- the Sessionname
- the property namedef
- default value if property not foundpublic static boolean getBooleanSystemProperty(java.lang.String name, boolean def)
name
- the property namedef
- default value if property not foundprivate static java.lang.Object getProp(java.util.Properties props, java.lang.String name)
private static int getInt(java.lang.Object value, int def)
private static boolean getBoolean(java.lang.Object value, boolean def)