Interface Configuration

    • Method Detail

      • getOptionalValue

        <T> Optional<T> getOptionalValue​(String name,
                                         Class<T> type)
        Returns the resolved value for the specified type of the named property.
        Type Parameters:
        T - the property type
        Parameters:
        name - the name of the parameter
        type - the type to convert the value to
        Returns:
        the resolved optional value
        Throws:
        IllegalArgumentException - if the type is not supported
        SecurityException - if the security manager is present and the ConfigPropertyPermission for the property is not allowed
      • getValue

        <T> T getValue​(String name,
                       Class<T> type)
        Returns the resolved value for the specified type of the named property.
        Type Parameters:
        T - the property type
        Parameters:
        name - the name of the parameter
        type - the type to convert the value to
        Returns:
        the resolved value
        Throws:
        IllegalArgumentException - if the type is not supported
        NoSuchElementException - if there is no property associated with the name
        SecurityException - if the security manager is present and the ConfigPropertyPermission for the property is not allowed