Collection<K, V> extension

on

Properties

clone Map<K, V>

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

no setter

Methods

find<T extends V>(bool callback(V element)) → T?

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

Returns the first element satisfying test, or null if there are none.
findOrFail<T extends V>(bool callback(V element), {String? message}) → T

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

Returns the first element satisfying test, or throw if there are none.
get<T extends V?>(K? key) → T?

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

Returns the value associated from the K parameter
getOr<T extends V?>(K? key, {T? defaultValue}) → T?

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

Returns the value associated from the K parameter or defined value
getOrFail<T extends V>(K? key, {String? message}) → T

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

Returns the value associated from the K parameter
overrideIfPresent(K key, V ifPresent()) → V?

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

Replaces the value associated with a key if it exists
set(K key, V value) → void

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

Inserts or replaces data in the collection
where<T extends V>(bool callback(V element)) Map<K, T>

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