RealmMap
A RealmMap
is used to map keys to values. RealmMap
s cannot contain duplicate keys and each key can be mapped to at most one value. RealmMap
s cannot have null
keys but can have null
values.
Similarly to RealmList and RealmSet, RealmDictionary
properties cannot be nullable.
Most importantly, RealmMap
s can only have String
keys and should not be used to define properties in RealmObjects. If you need to use a Map<String, V>
or a dictionary-type data structure for your model you should use RealmDictionary.
Parameters
the type of the keys stored in this map
the type of the values stored in this map
Inheritors
Functions
Observes changes to the RealmMap
. The Flow will emit InitialMap once subscribed, and then UpdatedMap on every change to the dictionary. The flow will continue running indefinitely until canceled or until the parent object is deleted.
Instantiates an unmanaged RealmDictionary containing all the elements of the receiver dictionary represented by a Map of String to T pairs.