Class PropertyMap


  • public class PropertyMap
    extends Object
    A wrapper for a Map that provides a Properties-like API.
    Author:
    Carl Harris
    • Constructor Detail

      • PropertyMap

        public PropertyMap​(Map<String,​Object> properties)
        Constructs a new instance that wraps the given map.
        Parameters:
        properties - properties map
    • Method Detail

      • get

        public Object get​(String key,
                          Object defaultValue)
        Gets the value of associated with the given key.
        Parameters:
        key - the subject key
        defaultValue - default value to return if no value is associated with key
        Returns:
        associated value or default
      • getString

        public String getString​(String key,
                                String defaultValue)
        Gets the string value associated with the given key.
        Parameters:
        key - the subject key
        defaultValue - default value to return if no value is associated with key
        Returns:
        associated value or default