Package io.smallrye.config
Class ConfigSourceMap
- java.lang.Object
-
- java.util.AbstractMap<String,String>
-
- io.smallrye.config.ConfigSourceMap
-
- All Implemented Interfaces:
Serializable,Map<String,String>
public class ConfigSourceMap extends AbstractMap<String,String> implements Map<String,String>, Serializable
AMap<String, String>which is backed by aConfigSource. This should not be used to implementConfigSource.getProperties()onConfigSourceinstances which do not overridegetPropertyNames(), 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 andConfigSource.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description ConfigSourceMap(org.eclipse.microprofile.config.spi.ConfigSource delegate)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(Object key)Set<Map.Entry<String,String>>entrySet()voidforEach(BiConsumer<? super String,? super String> action)Stringget(Object key)booleanisEmpty()Set<String>keySet()intsize()Collection<String>values()-
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, put, putAll, remove, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsValue, equals, getOrDefault, hashCode, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<String,String>- Overrides:
containsKeyin classAbstractMap<String,String>
-
values
public Collection<String> values()
-
-