Class ConfigSourceMap

  • All Implemented Interfaces:
    Serializable, Map<String,​String>

    public class ConfigSourceMap
    extends AbstractMap<String,​String>
    implements Map<String,​String>, Serializable
    A Map<String, String> which is backed by a ConfigSource. This should not be used to implement ConfigSource.getProperties() on ConfigSource instances which do not override getPropertyNames(), as this will result in infinite recursion.
    Implementation Note:
    The key set of the map is the result of calling ConfigSource.getPropertyNames(); the rest of the map operations are derived from this method and ConfigSource.getValue(String). The values collection and entry set are instantiated lazily and cached. The implementation attempts to make no assumptions about the efficiency of the backing implementation and prefers the most direct access possible.

    The backing collections are assumed to be immutable.

    See Also:
    Serialized Form