com.sun.mail.util

## Class PropUtil

- java.lang.Object
- - com.sun.mail.util.PropUtil

-     public class PropUtil
      extends Object

  Utilities to make it easier to get property values. Properties can be strings or type-specific value objects.
  Author:
    Bill Shannon

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `getBooleanProperty(Properties props, String name, boolean def)` Get a boolean valued property.
    `static boolean` | `getBooleanSessionProperty(Session session, String name, boolean def)` Get a boolean valued property.
    `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)` Get an integer valued property.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getIntProperty

          public static int getIntProperty(Properties props,
                           String name,
                           int def)

      Get an integer valued property.
      Parameters:
        `props` - the properties
        `name` - the property name
        `def` - default value if property not found
      Returns:
        the property value

    - #### getBooleanProperty

          public static boolean getBooleanProperty(Properties props,
                                   String name,
                                   boolean def)

      Get a boolean valued property.
      Parameters:
        `props` - the properties
        `name` - the property name
        `def` - default value if property not found
      Returns:
        the property value

    - #### getIntSessionProperty

          public static int getIntSessionProperty(Session session,
                                  String name,
                                  int def)

      Get an integer valued property.
      Parameters:
        `session` - the Session
        `name` - the property name
        `def` - default value if property not found
      Returns:
        the property value

    - #### getBooleanSessionProperty

          public static boolean getBooleanSessionProperty(Session session,
                                          String name,
                                          boolean def)

      Get a boolean valued property.
      Parameters:
        `session` - the Session
        `name` - the property name
        `def` - default value if property not found
      Returns:
        the property value

    - #### getBooleanSystemProperty

          public static boolean getBooleanSystemProperty(String name,
                                         boolean def)

      Get a boolean valued System property.
      Parameters:
        `name` - the property name
        `def` - default value if property not found
      Returns:
        the property value

Copyright © 2016 Oracle. All rights reserved.