MapExtension<K, V> extension

Map

on

Properties

isNotNullOrEmpty bool

Available on Map<K, V>?, provided by the MapExtension extension

Returns true if this nullable map is not null and contains at least one key-value pair.
no setter
isNullOrEmpty bool

Available on Map<K, V>?, provided by the MapExtension extension

Returns true if this nullable map is either null or empty.
no setter

Methods

addIfNotNull(K key, V value) Map<K, V>?

Available on Map<K, V>?, provided by the MapExtension extension

Adds an item into the map if the value is not null and the key does not exist.
capitalizeKeysFirstCharacter() Map<String, V>

Available on Map<K, V>?, provided by the MapExtension extension

Returns a new map with all keys' first character capitalized.
filter(bool predicate(K key, V value)) Map<K, V>

Available on Map<K, V>?, provided by the MapExtension extension

Returns a new map containing only the entries that satisfy the given predicate.
updateAndJoin(Map<K, V>? map) Map<K, V>

Available on Map<K, V>?, provided by the MapExtension extension

Merges this map with another map. If a key already exists, the new map's value overrides the existing one.