Collection<K, V> extension
Methods
-
find<T extends V>(bool callback(V element))
→ T?
-
Returns the first element satisfying test, or null if there are none.
-
findOrFail<T extends V>(bool callback(V element), {String? message})
→ T
-
Returns the first element satisfying test, or throw if there are none.
-
get<T extends V?>(K? key)
→ T?
-
Returns the value associated from the
K
parameter
-
getOr<T extends V?>(K? key, {T? defaultValue})
→ T?
-
Returns the value associated from the
K
parameter or defined value
-
getOrFail<T extends V>(K? key, {String? message})
→ T
-
Returns the value associated from the
K
parameter
-
overrideIfPresent(K key, V ifPresent())
→ V?
-
Replaces the value associated with a key if it exists
-
set(K key, V value)
→ void
-
Inserts or replaces data in the collection
-
where<T extends V>(bool callback(V element))
→ Map<K, T>
-