-
- All Implemented Interfaces:
-
kotlin.collections.Map,kotlin.collections.MutableMap,org.jitsi.metaconfig.ConfigSource
public final class MapConfigSource implements ConfigSource, Map<String, Any>
A ConfigSource which allows modifying the properties after its creation.
Useful for testing because the config source can be used by classes but its values changed later.
-
-
Method Summary
Modifier and Type Method Description StringgetName()A name for this ConfigSource to give extra context in the event of errors StringgetDescription()Set<Entry.Map<String, Object>>getEntries()Set<String>getKeys()IntegergetSize()Collection<Object>getValues()Function1<String, Object>getterFor(KType type)Given a type, return a function which takes in a configuration property key (aka a key 'name') and returns the value of the property at the given name as the type referred to by type. -
Methods inherited from class org.jitsi.metaconfig.MapConfigSource
clear, compute, computeIfAbsent, computeIfPresent, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll -
Methods inherited from class kotlin.collections.MutableMap
containsKey, containsValue, forEach, get, getOrDefault, isEmpty -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getName
String getName()
A name for this ConfigSource to give extra context in the event of errors
-
getDescription
String getDescription()
-
getEntries
Set<Entry.Map<String, Object>> getEntries()
-
getValues
Collection<Object> getValues()
-
getterFor
Function1<String, Object> getterFor(KType type)
Given a type, return a function which takes in a configuration property key (aka a key 'name') and returns the value of the property at the given name as the type referred to by type.
The return getter should return the value corresponding to the given key, or throw ConfigException.UnsupportedType if the type isn't supported.
-
-
-
-