Package com.sun.mail.util
Class PropUtil
java.lang.Object
com.sun.mail.util.PropUtil
Utilities to make it easier to get property values.
Properties can be strings or type-specific value objects.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
getBooleanProperty
(Properties props, String name, boolean def) Get a boolean valued property.static boolean
getBooleanSessionProperty
(Session session, String name, boolean def) Deprecated.static boolean
getBooleanSystemProperty
(String name, boolean def) Get a boolean valued System property.static int
getIntProperty
(Properties props, String name, int def) Get an integer valued property.static int
getIntSessionProperty
(Session session, String name, int def) Deprecated.
-
Method Details
-
getIntProperty
Get an integer valued property.- Parameters:
props
- the propertiesname
- the property namedef
- default value if property not found- Returns:
- the property value
-
getBooleanProperty
Get a boolean valued property.- Parameters:
props
- the propertiesname
- the property namedef
- default value if property not found- Returns:
- the property value
-
getIntSessionProperty
Deprecated.Get an integer valued property.- Parameters:
session
- the Sessionname
- the property namedef
- default value if property not found- Returns:
- the property value
-
getBooleanSessionProperty
@Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) Deprecated.Get a boolean valued property.- Parameters:
session
- the Sessionname
- the property namedef
- default value if property not found- Returns:
- the property value
-
getBooleanSystemProperty
Get a boolean valued System property.- Parameters:
name
- the property namedef
- default value if property not found- Returns:
- the property value
-