- HashMap <K, V>
- Empty
- HashMap (IEnumerable<(K Key, V Value)> items)
- HashMap (IEnumerable<(K Key, V Value)> items, bool tryAdd)
- item (K key)
- itemOrNone (K key)
- map <B> (Lens<V, B> lens)
- this []
- IsEmpty
- Count
- Filter (Func<V, bool> pred)
- Filter (Func<K, V, bool> pred)
- Map <U> (Func<V, U> mapper)
- Map <U> (Func<K, V, U> mapper)
- Add (K key, V valueToAdd)
- TryAdd (K key, V valueToAdd)
- AddOrUpdate (K key, V value)
- AddOrUpdate (K key, Func<V, V> Some, Func<V> None)
- AddOrUpdate (K key, Func<V, V> Some, V None)
- AddRange (IEnumerable<Tuple<K, V>> range)
- AddRange (IEnumerable<(K Key, V Value)> range)
- TryAddRange (IEnumerable<Tuple<K, V>> range)
- TryAddRange (IEnumerable<(K Key, V Value)> range)
- TryAddRange (IEnumerable<KeyValuePair<K, V>> range)
- AddOrUpdateRange (IEnumerable<Tuple<K, V>> range)
- AddOrUpdateRange (IEnumerable<(K Key, V Value)> range)
- AddOrUpdateRange (IEnumerable<KeyValuePair<K, V>> range)
- Remove (K key)
- Find (K key)
- Find <R> (K key, Func<V, R> Some, Func<R> None)
- FindOrAdd (K key, Func<V> None)
- FindOrAdd (K key, V valueToFindOrAdd)
- FindOrMaybeAdd (K key, Func<Option<V>> None)
- FindOrMaybeAdd (K key, Option<V> None)
- SetItem (K key, V valueToSet)
- SetItem (K key, Func<V, V> Some)
- TrySetItem (K key, V valueToSet)
- TrySetItem (K key, Func<V, V> Some)
- ContainsKey (K key)
- Contains (K key, V value)
- Contains <EqV> (V value)
- Contains <EqV> (K key, V value)
- AddRange (IEnumerable<KeyValuePair<K, V>> pairs)
- SetItems (IEnumerable<KeyValuePair<K, V>> items)
- SetItems (IEnumerable<Tuple<K, V>> items)
- SetItems (IEnumerable<(K Key, V Value)> items)
- TrySetItems (IEnumerable<KeyValuePair<K, V>> items)
- TrySetItems (IEnumerable<Tuple<K, V>> items)
- TrySetItems (IEnumerable<(K Key, V Value)> items)
- TrySetItems (IEnumerable<K> keys, Func<V, V> Some)
- RemoveRange (IEnumerable<K> keys)
- Contains ((K Key, V Value) pair)
- Keys
- Values
- ToDictionary <KR, VR> ( Func<(K Key, V Value), KR> keySelector, Func<(K Key, V Value), VR> valueSelector)
- GetEnumerator ()
- ToTrackingHashMap ()
- ToString ()
- ToFullString (string separator = ", ")
- ToFullArrayString (string separator = ", ")
- AsIterable ()
- == (HashMap<K, V> lhs, HashMap<K, V> rhs)
- != (HashMap<K, V> lhs, HashMap<K, V> rhs)
- + (HashMap<K, V> lhs, HashMap<K, V> rhs)
- Combine (HashMap<K, V> rhs)
- - (HashMap<K, V> lhs, HashMap<K, V> rhs)
- Subtract (HashMap<K, V> rhs)
- IsProperSubsetOf (IEnumerable<(K Key, V Value)> other)
- IsProperSubsetOf (IEnumerable<K> other)
- IsProperSupersetOf (IEnumerable<(K Key, V Value)> other)
- IsProperSupersetOf (IEnumerable<K> other)
- IsSubsetOf (IEnumerable<(K Key, V Value)> other)
- IsSubsetOf (IEnumerable<K> other)
- IsSubsetOf (HashMap<K, V> other)
- IsSupersetOf (IEnumerable<(K Key, V Value)> other)
- IsSupersetOf (IEnumerable<K> rhs)
- Intersect (IEnumerable<K> rhs)
- Intersect (IEnumerable<(K Key, V Value)> rhs)
- Intersect (IEnumerable<(K Key, V Value)> rhs, WhenMatched<K, V, V, V> Merge)
- Overlaps (IEnumerable<(K Key, V Value)> other)
- Overlaps (IEnumerable<K> other)
- Except (IEnumerable<K> rhs)
- Except (IEnumerable<(K Key, V Value)> rhs)
- SymmetricExcept (HashMap<K, V> rhs)
- SymmetricExcept (IEnumerable<(K Key, V Value)> rhs)
- Union (IEnumerable<(K, V)> rhs)
- Union (IEnumerable<(K, V)> other, WhenMatched<K, V, V, V> Merge)
- Union <W> (IEnumerable<(K, W)> other, WhenMissing<K, W, V> MapRight, WhenMatched<K, V, W, V> Merge)
- Union <W> (IEnumerable<(K, W)> other, WhenMissing<K, V, W> MapLeft, WhenMatched<K, V, W, W> Merge)
- Union <W, R> (IEnumerable<(K, W)> other, WhenMissing<K, V, R> MapLeft, WhenMissing<K, W, R> MapRight, WhenMatched<K, V, W, R> Merge)
- Equals (object? obj)
- Equals (HashMap<K, V> other)
- Equals <EqV> (HashMap<K, V> other)
- EqualsKeys (HashMap<K, V> other)
- GetHashCode ()
- Do (Action<V> f)
- Select <U> (Func<V, U> mapper)
- Select <U> (Func<K, V, U> mapper)
- Where (Func<V, bool> pred)
- Where (Func<K, V, bool> pred)
- ForAll (Func<K, V, bool> pred)
- ForAll (Func<(K Key, V Value), bool> pred)
- Exists (Func<K, V, bool> pred)
- Exists (Func<(K Key, V Value), bool> pred)
- Iter (Action<K, V> action)
- Iter (Action<(K Key, V Value)> action)
- TryGetValue (K key, out V value)
- ToReadOnlyDictionary ()
- AdditiveIdentity
- HashMap <EqK, K, V>
- Empty
- HashMap (IEnumerable<(K Key, V Value)> items)
- HashMap (IEnumerable<(K Key, V Value)> items, bool tryAdd)
- this []
- IsEmpty
- Count
- Length
- Filter (Func<V, bool> pred)
- Filter (Func<K, V, bool> pred)
- Map <U> (Func<V, U> mapper)
- Map <U> (Func<K, V, U> mapper)
- Add (K key, V value)
- TryAdd (K key, V value)
- AddOrUpdate (K key, V value)
- AddOrUpdate (K key, Func<V, V> Some, Func<V> None)
- AddOrUpdate (K key, Func<V, V> Some, V None)
- AddRange (IEnumerable<Tuple<K, V>> range)
- AddRange (IEnumerable<(K, V)> range)
- TryAddRange (IEnumerable<Tuple<K, V>> range)
- TryAddRange (IEnumerable<(K, V)> range)
- TryAddRange (IEnumerable<KeyValuePair<K, V>> range)
- AddOrUpdateRange (IEnumerable<Tuple<K, V>> range)
- AddOrUpdateRange (IEnumerable<(K, V)> range)
- AddOrUpdateRange (IEnumerable<KeyValuePair<K, V>> range)
- Remove (K key)
- Find (K key)
- FindSeq (K key)
- Find <R> (K key, Func<V, R> Some, Func<R> None)
- FindOrAdd (K key, Func<V> None)
- FindOrAdd (K key, V value)
- FindOrMaybeAdd (K key, Func<Option<V>> None)
- FindOrMaybeAdd (K key, Option<V> None)
- SetItem (K key, V value)
- SetItem (K key, Func<V, V> Some)
- TrySetItem (K key, V value)
- TrySetItem (K key, Func<V, V> Some)
- ContainsKey (K key)
- Contains (K key, V value)
- Contains <EqV> (K key, V value)
- Clear ()
- AddRange (IEnumerable<KeyValuePair<K, V>> pairs)
- SetItems (IEnumerable<KeyValuePair<K, V>> items)
- SetItems (IEnumerable<Tuple<K, V>> items)
- SetItems (IEnumerable<(K, V)> items)
- TrySetItems (IEnumerable<KeyValuePair<K, V>> items)
- TrySetItems (IEnumerable<Tuple<K, V>> items)
- TrySetItems (IEnumerable<(K, V)> items)
- TrySetItems (IEnumerable<K> keys, Func<V, V> Some)
- RemoveRange (IEnumerable<K> keys)
- Contains (KeyValuePair<K, V> pair)
- Contains <EqV> (KeyValuePair<K, V> pair)
- Keys
- Values
- ToDictionary <KR, VR> ( Func<(K Key, V Value), KR> keySelector, Func<(K Key, V Value), VR> valueSelector)
- GetEnumerator ()
- ToSeq ()
- ToTrackingHashMap ()
- ToString ()
- ToFullString (string separator = ", ")
- ToFullArrayString (string separator = ", ")
- AsEnumerable ()
- == (HashMap<EqK, K, V> lhs, HashMap<EqK, K, V> rhs)
- != (HashMap<EqK, K, V> lhs, HashMap<EqK, K, V> rhs)
- + (HashMap<EqK, K, V> lhs, HashMap<EqK, K, V> rhs)
- Combine (HashMap<EqK, K, V> rhs)
- - (HashMap<EqK, K, V> lhs, HashMap<EqK, K, V> rhs)
- Subtract (HashMap<EqK, K, V> rhs)
- IsProperSubsetOf (IEnumerable<(K Key, V Value)> other)
- IsProperSubsetOf (IEnumerable<K> other)
- IsProperSupersetOf (IEnumerable<(K Key, V Value)> other)
- IsProperSupersetOf (IEnumerable<K> other)
- IsSubsetOf (IEnumerable<(K Key, V Value)> other)
- IsSubsetOf (IEnumerable<K> other)
- IsSubsetOf (HashMap<EqK, K, V> other)
- IsSupersetOf (IEnumerable<(K Key, V Value)> other)
- IsSupersetOf (IEnumerable<K> rhs)
- Overlaps (IEnumerable<(K Key, V Value)> other)
- Overlaps (IEnumerable<K> other)
- Intersect (IEnumerable<K> rhs)
- Intersect (IEnumerable<(K Key, V Value)> rhs)
- Intersect (IEnumerable<(K Key, V Value)> rhs, WhenMatched<K, V, V, V> Merge)
- Except (IEnumerable<K> rhs)
- Except (IEnumerable<(K Key, V Value)> rhs)
- SymmetricExcept (HashMap<EqK, K, V> rhs)
- SymmetricExcept (IEnumerable<(K Key, V Value)> rhs)
- Union (IEnumerable<(K, V)> rhs)
- Union (IEnumerable<(K, V)> other, WhenMatched<K, V, V, V> Merge)
- Union <W> ( IEnumerable<(K, W)> other, WhenMissing<K, W, V> MapRight, WhenMatched<K, V, W, V> Merge)
- Union <W> ( IEnumerable<(K, W)> other, WhenMissing<K, V, W> MapLeft, WhenMatched<K, V, W, W> Merge)
- Union <W, R> ( IEnumerable<(K, W)> other, WhenMissing<K, V, R> MapLeft, WhenMissing<K, W, R> MapRight, WhenMatched<K, V, W, R> Merge)
- Equals (object? obj)
- Equals (HashMap<EqK, K, V> other)
- Equals <EqV> (HashMap<EqK, K, V> other)
- EqualKeys (HashMap<EqK, K, V> other)
- GetHashCode ()
- Do (Action<V> f)
- Select <U> (Func<V, U> mapper)
- Select <U> (Func<K, V, U> mapper)
- Where (Func<V, bool> pred)
- Where (Func<K, V, bool> pred)
- ForAll (Func<K, V, bool> pred)
- ForAll (Func<(K Key, V Value), bool> pred)
- ForAll (Func<V, bool> pred)
- Exists (Func<K, V, bool> pred)
- Exists (Func<(K Key, V Value), bool> pred)
- Exists (Func<V, bool> pred)
- Iter (Action<K, V> action)
- Iter (Action<V> action)
- Iter (Action<Tuple<K, V>> action)
- Iter (Action<(K Key, V Value)> action)
- Iter (Action<KeyValuePair<K, V>> action)
- Fold <S> (S state, Func<S, K, V, S> folder)
- ToReadOnlyDictionary ()
- TryGetValue (K key, out V value)
- AdditiveIdentity
- HashMapExtensions
- As <Key, V> (this K<HashMap<Key>, V> ma)
- ToHashMap <K, V> (this IEnumerable<(K, V)> items)
- ToHashMap <K1, K2, V> (this IEnumerable<(K1, K2, V)> items)
- ToHashMap <K1, K2, K3, V> (this IEnumerable<(K1, K2, K3, V)> items)
- ToHashMap <K1, K2, K3, K4, V> (this IEnumerable<(K1, K2, K3, K4, V)> items)
- AsQueryable <K, V> (this HashMap<K, V> source)
- HashMapExtensions
- As <EqKey, Key, V> (this K<HashMapEq<EqKey, Key>, V> ma)
- ToHashMap <EqK, K, V> (this IEnumerable<(K, V)> items)
- ToHashMap <EqK, K1, K2, V> (this IEnumerable<(K1, K2, V)> items)
- ToHashMap <EqK, K1, K2, K3, V> (this IEnumerable<(K1, K2, K3, V)> items)
- ToHashMap <EqK, K1, K2, K3, K4, V> (this IEnumerable<(K1, K2, K3, K4, V)> items)
- AsQueryable <EqK, K, V> (this HashMap<EqK, K, V> source)
- HashMapExtensions
- Map <Key, A, B> (this Func<A, B> f, K<HashMap<Key>, A> ma)
- Map <Key, A, B> (this Func<A, B> f, HashMap<Key, A> ma)
- Map <EqKey, Key, A, B> (this Func<A, B> f, K<HashMapEq<EqKey, Key>, A> ma)
- Map <EqKey, Key, A, B> (this Func<A, B> f, HashMap<EqKey, Key, A> ma)
- HashMap
- clear <K, V> (HashMap<K, V> map)
- empty <K, V> ()
- singleton <K, V> ((K, V) value)
- singleton <K, V> (K key, V value)
- create <K, V> ()
- create <K, V> (Tuple<K, V> head, params Tuple<K, V>[] tail)
- create <K, V> ((K, V) head, params (K, V)[] tail)
- create <K, V> (KeyValuePair<K, V> head, params KeyValuePair<K, V>[] tail)
- createRange <K, V> (IEnumerable<Tuple<K, V>> keyValues)
- createRange <K, V> (IEnumerable<(K, V)> keyValues)
- createRange <K, V> (ReadOnlySpan<(K, V)> keyValues)
- createRange <K, V> (IEnumerable<KeyValuePair<K, V>> keyValues)
- add <K, V> (HashMap<K, V> map, K key, V value)
- tryAdd <K, V> (HashMap<K, V> map, K key, V value)
- addOrUpdate <K, V> (HashMap<K, V> map, K key, V value)
- addOrUpdate <K, V> (HashMap<K, V> map, K key, Func<V, V> Some, Func<V> None)
- addOrUpdate <K, V> (HashMap<K, V> map, K key, Func<V, V> Some, V None)
- addRange <K, V> (HashMap<K, V> map, IEnumerable<Tuple<K, V>> keyValues)
- addRange <K, V> (HashMap<K, V> map, IEnumerable<(K, V)> keyValues)
- addRange <K, V> (HashMap<K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues)
- tryAddRange <K, V> (HashMap<K, V> map, IEnumerable<Tuple<K, V>> keyValues)
- tryAddRange <K, V> (HashMap<K, V> map, IEnumerable<(K, V)> keyValues)
- tryAddRange <K, V> (HashMap<K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues)
- addOrUpdateRange <K, V> (HashMap<K, V> map, IEnumerable<Tuple<K, V>> range)
- addOrUpdateRange <K, V> (HashMap<K, V> map, IEnumerable<(K, V)> range)
- addOrUpdateRange <K, V> (HashMap<K, V> map, IEnumerable<KeyValuePair<K, V>> range)
- remove <K, V> (HashMap<K, V> map, K key)
- containsKey <K, V> (HashMap<K, V> map, K key)
- contains <K, V> (HashMap<K, V> map, KeyValuePair<K, V> kv)
- contains <K, V> (HashMap<K, V> map, Tuple<K, V> kv)
- contains <K, V> (HashMap<K, V> map, (K, V) kv)
- setItem <K, V> (HashMap<K, V> map, K key, V value)
- trySetItem <K, V> (HashMap<K, V> map, K key, V value)
- trySetItem <K, V> (HashMap<K, V> map, K key, Func<V, V> Some)
- setItems <K, V> (HashMap<K, V> map, IEnumerable<Tuple<K, V>> items)
- setItems <K, V> (HashMap<K, V> map, IEnumerable<(K, V)> items)
- setItems <K, V> (HashMap<K, V> map, IEnumerable<KeyValuePair<K, V>> items)
- trySetItems <K, V> (HashMap<K, V> map, IEnumerable<Tuple<K, V>> items)
- trySetItems <K, V> (HashMap<K, V> map, IEnumerable<(K, V)> items)
- trySetItems <K, V> (HashMap<K, V> map, IEnumerable<KeyValuePair<K, V>> items)
- trySetItems <K, V> (HashMap<K, V> map, IEnumerable<K> keys, Func<V, V> Some)
- find <K, V> (HashMap<K, V> map, K key)
- find <K, V, R> (HashMap<K, V> map, K key, Func<V, R> Some, Func<R> None)
- setItem <K, V> (HashMap<K, V> map, K key, Func<V, V> mapper)
- iter <K, V> (HashMap<K, V> map, Action<V> action)
- iter <K, V> (HashMap<K, V> map, Action<K, V> action)
- forall <K, V> (HashMap<K, V> map, Func<V, bool> pred)
- forall <K, V> (HashMap<K, V> map, Func<K, V, bool> pred)
- forall <K, V> (HashMap<K, V> map, Func<(K Key, V Value), bool> pred)
- map <K, T, U> (HashMap<K, T> map, Func<T, U> f)
- map <K, T, U> (HashMap<K, T> map, Func<K, T, U> f)
- filter <K, V> (HashMap<K, V> map, Func<V, bool> predicate)
- filter <K, V> (HashMap<K, V> map, Func<K, V, bool> predicate)
- HashMap
- clear <EqK, K, V> (HashMap<EqK, K, V> map)
- empty <EqK, K, V> ()
- create <EqK, K, V> ()
- singleton <EqK, K, V> (K key, V value)
- create <EqK, K, V> (Tuple<K, V> head, params Tuple<K, V>[] tail)
- create <EqK, K, V> ((K, V) head, params (K, V)[] tail)
- create <EqK, K, V> (KeyValuePair<K, V> head, params KeyValuePair<K, V>[] tail)
- createRange <EqK, K, V> (IEnumerable<Tuple<K, V>> keyValues)
- createRange <EqK, K, V> (IEnumerable<(K, V)> keyValues)
- createRange <EqK, K, V> (ReadOnlySpan<(K, V)> keyValues)
- createRange <EqK, K, V> (IEnumerable<KeyValuePair<K, V>> keyValues)
- add <EqK, K, V> (HashMap<EqK, K, V> map, K key, V value)
- tryAdd <EqK, K, V> (HashMap<EqK, K, V> map, K key, V value)
- addOrUpdate <EqK, K, V> (HashMap<EqK, K, V> map, K key, V value)
- addOrUpdate <EqK, K, V> (HashMap<EqK, K, V> map, K key, Func<V, V> Some, Func<V> None)
- addOrUpdate <EqK, K, V> (HashMap<EqK, K, V> map, K key, Func<V, V> Some, V None)
- addRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<Tuple<K, V>> keyValues)
- addRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<(K, V)> keyValues)
- addRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues)
- tryAddRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<Tuple<K, V>> keyValues)
- tryAddRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<(K, V)> keyValues)
- tryAddRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues)
- addOrUpdateRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<Tuple<K, V>> range)
- addOrUpdateRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<(K, V)> range)
- addOrUpdateRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<KeyValuePair<K, V>> range)
- remove <EqK, K, V> (HashMap<EqK, K, V> map, K key)
- containsKey <EqK, K, V> (HashMap<EqK, K, V> map, K key)
- contains <EqK, K, V> (HashMap<EqK, K, V> map, KeyValuePair<K, V> kv)
- contains <EqK, K, V> (HashMap<EqK, K, V> map, Tuple<K, V> kv)
- contains <EqK, K, V> (HashMap<EqK, K, V> map, (K, V) kv)
- setItem <EqK, K, V> (HashMap<EqK, K, V> map, K key, V value)
- trySetItem <EqK, K, V> (HashMap<EqK, K, V> map, K key, V value)
- trySetItem <EqK, K, V> (HashMap<EqK, K, V> map, K key, Func<V, V> Some)
- setItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<Tuple<K, V>> items)
- setItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<(K, V)> items)
- setItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<KeyValuePair<K, V>> items)
- trySetItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<Tuple<K, V>> items)
- trySetItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<(K, V)> items)
- trySetItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<KeyValuePair<K, V>> items)
- trySetItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<K> keys, Func<V, V> Some)
- find <EqK, K, V> (HashMap<EqK, K, V> map, K key)
- findSeq <EqK, K, V> (HashMap<EqK, K, V> map, K key)
- find <EqK, K, V, R> (HashMap<EqK, K, V> map, K key, Func<V, R> Some, Func<R> None)
- setItem <EqK, K, V> (HashMap<EqK, K, V> map, K key, Func<V, V> mapper)
- iter <EqK, K, V> (HashMap<EqK, K, V> map, Action<V> action)
- iter <EqK, K, V> (HashMap<EqK, K, V> map, Action<K, V> action)
- forall <EqK, K, V> (HashMap<EqK, K, V> map, Func<V, bool> pred)
- forall <EqK, K, V> (HashMap<EqK, K, V> map, Func<K, V, bool> pred)
- forall <EqK, K, V> (HashMap<EqK, K, V> map, Func<(K Key, V Value), bool> pred)
- map <EqK, K, T, U> (HashMap<EqK, K, T> map, Func<T, U> f)
- map <EqK, K, T, U> (HashMap<EqK, K, T> map, Func<K, T, U> f)
- filter <EqK, K, V> (HashMap<EqK, K, V> map, Func<V, bool> predicate)
- filter <EqK, K, V> (HashMap<EqK, K, V> map, Func<K, V, bool> predicate)
- length <EqK, K, T> (HashMap<EqK, K, T> map)
- fold <EqK, S, K, V> (HashMap<EqK, K, V> map, S state, Func<S, K, V, S> folder)
- exists <EqK, K, V> (HashMap<EqK, K, V> map, Func<K, V, bool> pred)
- exists <EqK, K, V> (HashMap<EqK, K, V> map, Func<(K Key, V Value), bool> pred)
- exists <EqK, K, V> (HashMap<EqK, K, V> map, Func<V, bool> pred)
- Prelude
- map <Key, A, B> (Func<A, B> f, K<HashMap<Key>, A> ma)
- map <EqKey, Key, A, B> (this Func<A, B> f, K<HashMapEq<EqKey, Key>, A> ma)
- HashMap <Key>
- HashMapEq <EqKey, Key>
struct HashMap <K, V> Source #
Unsorted immutable hash-map
type | K | Key type |
type | V | Value |
property HashMap<K, V> AdditiveIdentity Source #
method Lens<HashMap<K, V>, Option<V>> itemOrNone (K key) Source #
Item or none at index lens
method HashMap<K, V> Filter (Func<V, bool> pred) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method HashMap<K, V> Filter (Func<K, V, bool> pred) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method HashMap<K, U> Map <U> (Func<V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method HashMap<K, U> Map <U> (Func<K, V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method HashMap<K, V> Add (K key, V valueToAdd) Source #
Atomically adds a new item to the map
Null is not allowed for a Key or a Value
param | key | Key |
param | valueToAdd | Value |
returns | New Map with the item added |
method HashMap<K, V> TryAdd (K key, V valueToAdd) Source #
Atomically adds a new item to the map. If the key already exists, then the new item is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | valueToAdd | Value |
returns | New Map with the item added |
method HashMap<K, V> AddOrUpdate (K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, the new item replaces it.
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<K, V> AddOrUpdate (K key, Func<V, V> Some, Func<V> None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method HashMap<K, V> AddOrUpdate (K key, Func<V, V> Some, V None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method HashMap<K, V> AddRange (IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<K, V> AddRange (IEnumerable<(K Key, V Value)> range) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<K, V> TryAddRange (IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<K, V> TryAddRange (IEnumerable<(K Key, V Value)> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<K, V> TryAddRange (IEnumerable<KeyValuePair<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method HashMap<K, V> AddOrUpdateRange (IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<K, V> AddOrUpdateRange (IEnumerable<(K Key, V Value)> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<K, V> AddOrUpdateRange (IEnumerable<KeyValuePair<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method HashMap<K, V> Remove (K key) Source #
Atomically removes an item from the map If the key doesn't exists, the request is ignored.
param | key | Key |
returns | New map with the item removed |
method Option<V> Find (K key) Source #
Retrieve a value from the map by key
param | key | Key to find |
returns | Found value |
method R Find <R> (K key, Func<V, R> Some, Func<R> None) Source #
Retrieve a value from the map by key and pattern match the result.
param | key | Key to find |
returns | Found value |
method (HashMap<K, V> Map, V Value) FindOrAdd (K key, Func<V> None) Source #
Try to find the key in the map, if it doesn't exist, add a new item by invoking the delegate provided.
param | key | Key to find |
param | None | Delegate to get the value |
returns | Updated map and added value |
method (HashMap<K, V>, V Value) FindOrAdd (K key, V valueToFindOrAdd) Source #
Try to find the key in the map, if it doesn't exist, add a new item provided.
param | key | Key to find |
param | valueToFindOrAdd | value |
returns | Updated map and added value |
method (HashMap<K, V> Map, Option<V> Value) FindOrMaybeAdd (K key, Func<Option<V>> None) Source #
Try to find the key in the map, if it doesn't exist, add a new item by invoking the delegate provided.
param | key | Key to find |
param | None | Delegate to get the value |
returns | Updated map and added value |
method (HashMap<K, V> Map, Option<V> Value) FindOrMaybeAdd (K key, Option<V> None) Source #
Try to find the key in the map, if it doesn't exist, add a new item by invoking the delegate provided.
param | key | Key to find |
param | None | Delegate to get the value |
returns | Updated map and added value |
method HashMap<K, V> SetItem (K key, V valueToSet) Source #
Atomically updates an existing item
Null is not allowed for a Key or a Value
param | key | Key |
param | valueToSet | Value |
returns | New Map with the item added |
method HashMap<K, V> SetItem (K key, Func<V, V> Some) Source #
Retrieve a value from the map by key, map it to a new value, put it back.
param | key | Key to set |
returns | New map with the mapped value |
method HashMap<K, V> TrySetItem (K key, V valueToSet) Source #
Atomically updates an existing item, unless it doesn't exist, in which case it is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | valueToSet | Value |
returns | New Map with the item added |
method HashMap<K, V> TrySetItem (K key, Func<V, V> Some) Source #
Atomically sets an item by first retrieving it, applying a map, and then putting it back. Silently fails if the value doesn't exist
param | key | Key to set |
param | Some | delegate to map the existing value to a new one before setting |
returns | New map with the item set |
method bool ContainsKey (K key) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool Contains (K key, V value) Source #
Checks for existence of a key and value in the map
param | key | Key to check |
param | value | Value to check |
returns | True if an item with the key supplied is in the map |
method bool Contains <EqV> (V value) Source #
Checks for existence of a value in the map
param | value | Value to check |
returns | True if an item with the value supplied is in the map |
method bool Contains <EqV> (K key, V value) Source #
Checks for existence of a key and value in the map
param | key | Key to check |
param | value | Value to check |
returns | True if an item with the key supplied is in the map |
method HashMap<K, V> AddRange (IEnumerable<KeyValuePair<K, V>> pairs) Source #
Atomically adds a range of items to the map
param | pairs | Range of KeyValuePairs to add |
returns | New Map with the items added |
method HashMap<K, V> SetItems (IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided
param | items | Items to set |
returns | New map with the items set |
method HashMap<K, V> SetItems (IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method HashMap<K, V> SetItems (IEnumerable<(K Key, V Value)> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method HashMap<K, V> TrySetItems (IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided. If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method HashMap<K, V> TrySetItems (IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method HashMap<K, V> TrySetItems (IEnumerable<(K Key, V Value)> items) Source #
Atomically sets a series of items using the Tuples provided If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method HashMap<K, V> TrySetItems (IEnumerable<K> keys, Func<V, V> Some) Source #
Atomically sets a series of items using the keys provided to find the items and the Some delegate maps to a new value. If the items don't exist then they're silently ignored.
param | keys | Keys of items to set |
param | Some | Function map the existing item to a new one |
returns | New map with the items set |
method HashMap<K, V> RemoveRange (IEnumerable<K> keys) Source #
Atomically removes a set of keys from the map
param | keys | Keys to remove |
returns | New map with the items removed |
method bool Contains ((K Key, V Value) pair) Source #
Returns true if a Key/Value pair exists in the map
param | pair | Pair to find |
returns | True if exists, false otherwise |
method IDictionary<KR, VR> ToDictionary <KR, VR> ( Func<(K Key, V Value), KR> keySelector, Func<(K Key, V Value), VR> valueSelector) Source #
Map the map the a dictionary
method IEnumerator<(K Key, V Value)> GetEnumerator () Source #
GetEnumerator - IEnumerable interface
method HashMap<K, V> ToTrackingHashMap () Source #
Allocation free conversion to a TrackingHashMap
method string ToString () Source #
Format the collection as [(key: value), (key: value), (key: value), ...]
The elipsis is used for collections over 50 items
To get a formatted string with all the items, use ToFullString
or ToFullArrayString
.
method string ToFullString (string separator = ", ") Source #
Format the collection as (key: value), (key: value), (key: value), ...
method string ToFullArrayString (string separator = ", ") Source #
Format the collection as [(key: value), (key: value), (key: value), ...]
method Iterable<(K Key, V Value)> AsIterable () Source #
method bool IsProperSubsetOf (IEnumerable<(K Key, V Value)> other) Source #
Returns True if 'other' is a proper subset of this set
returns | True if 'other' is a proper subset of this set |
method bool IsProperSubsetOf (IEnumerable<K> other) Source #
Returns True if 'other' is a proper subset of this set
returns | True if 'other' is a proper subset of this set |
method bool IsProperSupersetOf (IEnumerable<(K Key, V Value)> other) Source #
Returns True if 'other' is a proper superset of this set
returns | True if 'other' is a proper superset of this set |
method bool IsProperSupersetOf (IEnumerable<K> other) Source #
Returns True if 'other' is a proper superset of this set
returns | True if 'other' is a proper superset of this set |
method bool IsSubsetOf (IEnumerable<(K Key, V Value)> other) Source #
Returns True if 'other' is a superset of this set
returns | True if 'other' is a superset of this set |
method bool IsSubsetOf (IEnumerable<K> other) Source #
Returns True if 'other' is a superset of this set
returns | True if 'other' is a superset of this set |
method bool IsSubsetOf (HashMap<K, V> other) Source #
Returns True if 'other' is a superset of this set
returns | True if 'other' is a superset of this set |
method bool IsSupersetOf (IEnumerable<(K Key, V Value)> other) Source #
Returns True if 'other' is a superset of this set
returns | True if 'other' is a superset of this set |
method bool IsSupersetOf (IEnumerable<K> rhs) Source #
Returns True if 'other' is a superset of this set
returns | True if 'other' is a superset of this set |
method HashMap<K, V> Intersect (IEnumerable<K> rhs) Source #
Returns the elements that are in both this and other
method HashMap<K, V> Intersect (IEnumerable<(K Key, V Value)> rhs) Source #
Returns the elements that are in both this and other
method HashMap<K, V> Intersect (IEnumerable<(K Key, V Value)> rhs, WhenMatched<K, V, V, V> Merge) Source #
Returns the elements that are in both this and other
method bool Overlaps (IEnumerable<(K Key, V Value)> other) Source #
Returns True if other overlaps this set
method HashMap<K, V> Except (IEnumerable<K> rhs) Source #
Returns this - other. Only the items in this that are not in other will be returned.
method HashMap<K, V> Except (IEnumerable<(K Key, V Value)> rhs) Source #
Returns this - other. Only the items in this that are not in other will be returned.
method HashMap<K, V> SymmetricExcept (HashMap<K, V> rhs) Source #
Only items that are in one set or the other will be returned. If an item is in both, it is dropped.
method HashMap<K, V> SymmetricExcept (IEnumerable<(K Key, V Value)> rhs) Source #
Only items that are in one set or the other will be returned. If an item is in both, it is dropped.
method HashMap<K, V> Union (IEnumerable<(K, V)> rhs) Source #
Finds the union of two sets and produces a new set with the results
param | other | Other set to union with |
returns | A set which contains all items from both sets |
method HashMap<K, V> Union (IEnumerable<(K, V)> other, WhenMatched<K, V, V, V> Merge) Source #
Union two maps.
The WhenMatched
merge function is called when keys are present in both map to allow resolving to a
sensible value.
method HashMap<K, V> Union <W> (IEnumerable<(K, W)> other, WhenMissing<K, W, V> MapRight, WhenMatched<K, V, W, V> Merge) Source #
Union two maps.
The WhenMatched
merge function is called when keys are present in both map to allow resolving to a
sensible value.
The WhenMissing
function is called when there is a key in the right-hand side, but not the left-hand-side.
This allows the V2
value-type to be mapped to the target V
value-type.
method HashMap<K, W> Union <W> (IEnumerable<(K, W)> other, WhenMissing<K, V, W> MapLeft, WhenMatched<K, V, W, W> Merge) Source #
Union two maps.
The WhenMatched
merge function is called when keys are present in both map to allow resolving to a
sensible value.
The WhenMissing
function is called when there is a key in the left-hand side, but not the right-hand-side.
This allows the V
value-type to be mapped to the target V2
value-type.
method HashMap<K, R> Union <W, R> (IEnumerable<(K, W)> other, WhenMissing<K, V, R> MapLeft, WhenMissing<K, W, R> MapRight, WhenMatched<K, V, W, R> Merge) Source #
Union two maps.
The WhenMatched
merge function is called when keys are present in both map to allow resolving to a
sensible value.
The WhenMissing MapLeft
function is called when there is a key in the left-hand side, but not the
right-hand-side. This allows the V
value-type to be mapped to the target R
value-type.
The WhenMissing MapRight
function is called when there is a key in the right-hand side, but not the
left-hand-side. This allows the V2
value-type to be mapped to the target R
value-type.
method bool Equals (object? obj) Source #
Equality of keys and values with EqDefault<V>
used for values
method bool Equals (HashMap<K, V> other) Source #
Equality of keys and values with EqDefault<V>
used for values
method bool Equals <EqV> (HashMap<K, V> other) Source #
Equality of keys and values with EqV
used for values
method bool EqualsKeys (HashMap<K, V> other) Source #
Equality of keys only
method int GetHashCode () Source #
method HashMap<K, V> Do (Action<V> f) Source #
Impure iteration of the bound values in the structure
returns | Returns the original unmodified structure |
method HashMap<K, U> Select <U> (Func<V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method HashMap<K, U> Select <U> (Func<K, V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method HashMap<K, V> Where (Func<V, bool> pred) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method HashMap<K, V> Where (Func<K, V, bool> pred) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method bool ForAll (Func<K, V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool ForAll (Func<(K Key, V Value), bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<K, V, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<(K Key, V Value), bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method Unit Iter (Action<K, V> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit Iter (Action<(K Key, V Value)> action) Source #
Atomically iterate through all key/value pairs (as tuples) in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method bool TryGetValue (K key, out V value) Source #
method IReadOnlyDictionary<K, V> ToReadOnlyDictionary () Source #
Get a IReadOnlyDictionary for this map. No mapping is required, so this is very fast.
struct HashMap <EqK, K, V> Source #
Unsorted immutable hash-map
type | K | Key type |
type | V | Value |
property HashMap<EqK, K, V> AdditiveIdentity Source #
method HashMap<EqK, K, V> Filter (Func<V, bool> pred) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method HashMap<EqK, K, V> Filter (Func<K, V, bool> pred) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method HashMap<EqK, K, U> Map <U> (Func<V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method HashMap<EqK, K, U> Map <U> (Func<K, V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method HashMap<EqK, K, V> Add (K key, V value) Source #
Atomically adds a new item to the map
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<EqK, K, V> TryAdd (K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, then the new item is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<EqK, K, V> AddOrUpdate (K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, the new item replaces it.
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<EqK, K, V> AddOrUpdate (K key, Func<V, V> Some, Func<V> None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method HashMap<EqK, K, V> AddOrUpdate (K key, Func<V, V> Some, V None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method HashMap<EqK, K, V> AddRange (IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> AddRange (IEnumerable<(K, V)> range) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> TryAddRange (IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> TryAddRange (IEnumerable<(K, V)> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> TryAddRange (IEnumerable<KeyValuePair<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> AddOrUpdateRange (IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> AddOrUpdateRange (IEnumerable<(K, V)> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> AddOrUpdateRange (IEnumerable<KeyValuePair<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> Remove (K key) Source #
Atomically removes an item from the map If the key doesn't exists, the request is ignored.
param | key | Key |
returns | New map with the item removed |
method Option<V> Find (K key) Source #
Retrieve a value from the map by key
param | key | Key to find |
returns | Found value |
method Seq<V> FindSeq (K key) Source #
Retrieve a value from the map by key as an enumerable
param | key | Key to find |
returns | Found value |
method R Find <R> (K key, Func<V, R> Some, Func<R> None) Source #
Retrieve a value from the map by key and pattern match the result.
param | key | Key to find |
returns | Found value |
method (HashMap<EqK, K, V> Map, V Value) FindOrAdd (K key, Func<V> None) Source #
Try to find the key in the map, if it doesn't exist, add a new item by invoking the delegate provided.
param | key | Key to find |
param | None | Delegate to get the value |
returns | Updated map and added value |
method (HashMap<EqK, K, V>, V Value) FindOrAdd (K key, V value) Source #
Try to find the key in the map, if it doesn't exist, add a new item provided.
param | key | Key to find |
param | value | Delegate to get the value |
returns | Updated map and added value |
method (HashMap<EqK, K, V> Map, Option<V> Value) FindOrMaybeAdd (K key, Func<Option<V>> None) Source #
Try to find the key in the map, if it doesn't exist, add a new item by invoking the delegate provided.
param | key | Key to find |
param | None | Delegate to get the value |
returns | Updated map and added value |
method (HashMap<EqK, K, V> Map, Option<V> Value) FindOrMaybeAdd (K key, Option<V> None) Source #
Try to find the key in the map, if it doesn't exist, add a new item by invoking the delegate provided.
param | key | Key to find |
param | None | Delegate to get the value |
returns | Updated map and added value |
method HashMap<EqK, K, V> SetItem (K key, V value) Source #
Atomically updates an existing item
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<EqK, K, V> SetItem (K key, Func<V, V> Some) Source #
Retrieve a value from the map by key, map it to a new value, put it back.
param | key | Key to set |
returns | New map with the mapped value |
method HashMap<EqK, K, V> TrySetItem (K key, V value) Source #
Atomically updates an existing item, unless it doesn't exist, in which case it is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<EqK, K, V> TrySetItem (K key, Func<V, V> Some) Source #
Atomically sets an item by first retrieving it, applying a map, and then putting it back. Silently fails if the value doesn't exist
param | key | Key to set |
param | Some | delegate to map the existing value to a new one before setting |
returns | New map with the item set |
method bool ContainsKey (K key) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool Contains (K key, V value) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool Contains <EqV> (K key, V value) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method HashMap<EqK, K, V> Clear () Source #
Clears all items from the map
Functionally equivalent to calling Map.empty as the original structure is untouched
returns | Empty map |
method HashMap<EqK, K, V> AddRange (IEnumerable<KeyValuePair<K, V>> pairs) Source #
Atomically adds a range of items to the map
param | pairs | Range of KeyValuePairs to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> SetItems (IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided
param | items | Items to set |
returns | New map with the items set |
method HashMap<EqK, K, V> SetItems (IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method HashMap<EqK, K, V> SetItems (IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method HashMap<EqK, K, V> TrySetItems (IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided. If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method HashMap<EqK, K, V> TrySetItems (IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method HashMap<EqK, K, V> TrySetItems (IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method HashMap<EqK, K, V> TrySetItems (IEnumerable<K> keys, Func<V, V> Some) Source #
Atomically sets a series of items using the keys provided to find the items and the Some delegate maps to a new value. If the items don't exist then they're silently ignored.
param | keys | Keys of items to set |
param | Some | Function map the existing item to a new one |
returns | New map with the items set |
method HashMap<EqK, K, V> RemoveRange (IEnumerable<K> keys) Source #
Atomically removes a set of keys from the map
param | keys | Keys to remove |
returns | New map with the items removed |
method bool Contains (KeyValuePair<K, V> pair) Source #
Returns true if a Key/Value pair exists in the map
param | pair | Pair to find |
returns | True if exists, false otherwise |
method bool Contains <EqV> (KeyValuePair<K, V> pair) Source #
Returns true if a Key/Value pair exists in the map
param | pair | Pair to find |
returns | True if exists, false otherwise |
method IDictionary<KR, VR> ToDictionary <KR, VR> ( Func<(K Key, V Value), KR> keySelector, Func<(K Key, V Value), VR> valueSelector) Source #
Map the map the a dictionary
method IEnumerator<(K Key, V Value)> GetEnumerator () Source #
GetEnumerator - IEnumerable interface
method HashMap<EqK, K, V> ToTrackingHashMap () Source #
Allocation free conversion to a TrackingHashMap
method string ToString () Source #
Format the collection as [(key: value), (key: value), (key: value), ...]
The elipsis is used for collections over 50 items
To get a formatted string with all the items, use ToFullString
or ToFullArrayString
.
method string ToFullString (string separator = ", ") Source #
Format the collection as (key: value), (key: value), (key: value), ...
method string ToFullArrayString (string separator = ", ") Source #
Format the collection as [(key: value), (key: value), (key: value), ...]
method Iterable<(K Key, V Value)> AsEnumerable () Source #
method bool IsProperSubsetOf (IEnumerable<(K Key, V Value)> other) Source #
Returns True if 'other' is a proper subset of this set
returns | True if 'other' is a proper subset of this set |
method bool IsProperSubsetOf (IEnumerable<K> other) Source #
Returns True if 'other' is a proper subset of this set
returns | True if 'other' is a proper subset of this set |
method bool IsProperSupersetOf (IEnumerable<(K Key, V Value)> other) Source #
Returns True if 'other' is a proper superset of this set
returns | True if 'other' is a proper superset of this set |
method bool IsProperSupersetOf (IEnumerable<K> other) Source #
Returns True if 'other' is a proper superset of this set
returns | True if 'other' is a proper superset of this set |
method bool IsSubsetOf (IEnumerable<(K Key, V Value)> other) Source #
Returns True if 'other' is a superset of this set
returns | True if 'other' is a superset of this set |
method bool IsSubsetOf (IEnumerable<K> other) Source #
Returns True if 'other' is a superset of this set
returns | True if 'other' is a superset of this set |
method bool IsSubsetOf (HashMap<EqK, K, V> other) Source #
Returns True if 'other' is a superset of this set
returns | True if 'other' is a superset of this set |
method bool IsSupersetOf (IEnumerable<(K Key, V Value)> other) Source #
Returns True if 'other' is a superset of this set
returns | True if 'other' is a superset of this set |
method bool IsSupersetOf (IEnumerable<K> rhs) Source #
Returns True if 'other' is a superset of this set
returns | True if 'other' is a superset of this set |
method bool Overlaps (IEnumerable<(K Key, V Value)> other) Source #
Returns True if other overlaps this set
method HashMap<EqK, K, V> Intersect (IEnumerable<K> rhs) Source #
Returns the elements that are in both this and other
method HashMap<EqK, K, V> Intersect (IEnumerable<(K Key, V Value)> rhs) Source #
Returns the elements that are in both this and other
method HashMap<EqK, K, V> Intersect (IEnumerable<(K Key, V Value)> rhs, WhenMatched<K, V, V, V> Merge) Source #
Returns the elements that are in both this and other
method HashMap<EqK, K, V> Except (IEnumerable<K> rhs) Source #
Returns this - other. Only the items in this that are not in other will be returned.
method HashMap<EqK, K, V> Except (IEnumerable<(K Key, V Value)> rhs) Source #
Returns this - other. Only the items in this that are not in other will be returned.
method HashMap<EqK, K, V> SymmetricExcept (HashMap<EqK, K, V> rhs) Source #
Only items that are in one set or the other will be returned. If an item is in both, it is dropped.
method HashMap<EqK, K, V> SymmetricExcept (IEnumerable<(K Key, V Value)> rhs) Source #
Only items that are in one set or the other will be returned. If an item is in both, it is dropped.
method HashMap<EqK, K, V> Union (IEnumerable<(K, V)> rhs) Source #
Finds the union of two sets and produces a new set with the results
param | other | Other set to union with |
returns | A set which contains all items from both sets |
method HashMap<EqK, K, V> Union (IEnumerable<(K, V)> other, WhenMatched<K, V, V, V> Merge) Source #
Union two maps.
The WhenMatched
merge function is called when keys are present in both map to allow resolving to a
sensible value.
method HashMap<EqK, K, V> Union <W> ( IEnumerable<(K, W)> other, WhenMissing<K, W, V> MapRight, WhenMatched<K, V, W, V> Merge) Source #
Union two maps.
The WhenMatched
merge function is called when keys are present in both map to allow resolving to a
sensible value.
The WhenMissing
function is called when there is a key in the right-hand side, but not the left-hand-side.
This allows the V2
value-type to be mapped to the target V
value-type.
method HashMap<EqK, K, W> Union <W> ( IEnumerable<(K, W)> other, WhenMissing<K, V, W> MapLeft, WhenMatched<K, V, W, W> Merge) Source #
Union two maps.
The WhenMatched
merge function is called when keys are present in both map to allow resolving to a
sensible value.
The WhenMissing
function is called when there is a key in the left-hand side, but not the right-hand-side.
This allows the V
value-type to be mapped to the target V2
value-type.
method HashMap<EqK, K, R> Union <W, R> ( IEnumerable<(K, W)> other, WhenMissing<K, V, R> MapLeft, WhenMissing<K, W, R> MapRight, WhenMatched<K, V, W, R> Merge) Source #
Union two maps.
The WhenMatched
merge function is called when keys are present in both map to allow resolving to a
sensible value.
The WhenMissing MapLeft
function is called when there is a key in the left-hand side, but not the
right-hand-side. This allows the V
value-type to be mapped to the target R
value-type.
The WhenMissing MapRight
function is called when there is a key in the right-hand side, but not the
left-hand-side. This allows the V2
value-type to be mapped to the target R
value-type.
method bool Equals (HashMap<EqK, K, V> other) Source #
Equality of keys and values with EqDefault<V>
used for values
method bool Equals <EqV> (HashMap<EqK, K, V> other) Source #
Equality of keys and values
method int GetHashCode () Source #
method HashMap<EqK, K, V> Do (Action<V> f) Source #
Impure iteration of the bound values in the structure
returns | Returns the original unmodified structure |
method HashMap<EqK, K, U> Select <U> (Func<V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method HashMap<EqK, K, U> Select <U> (Func<K, V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method HashMap<EqK, K, V> Where (Func<V, bool> pred) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method HashMap<EqK, K, V> Where (Func<K, V, bool> pred) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method bool ForAll (Func<K, V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool ForAll (Func<(K Key, V Value), bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool ForAll (Func<V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<K, V, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<(K Key, V Value), bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<V, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method Unit Iter (Action<K, V> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit Iter (Action<V> action) Source #
Atomically iterate through all values in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit Iter (Action<Tuple<K, V>> action) Source #
Atomically iterate through all key/value pairs (as tuples) in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit Iter (Action<(K Key, V Value)> action) Source #
Atomically iterate through all key/value pairs (as tuples) in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit Iter (Action<KeyValuePair<K, V>> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method S Fold <S> (S state, Func<S, K, V, S> folder) Source #
Atomically folds all items in the map (in order) using the folder function provided.
type | S | State type |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method IReadOnlyDictionary<K, V> ToReadOnlyDictionary () Source #
Get a IReadOnlyDictionary for this map. No mapping is required, so this is very fast.
method bool TryGetValue (K key, out V value) Source #
class HashMapExtensions Source #
method HashMap<K, V> ToHashMap <K, V> (this IEnumerable<(K, V)> items) Source #
Create an immutable hash-map
method HashMap<(K1, K2), V> ToHashMap <K1, K2, V> (this IEnumerable<(K1, K2, V)> items) Source #
Create an immutable hash-map
method HashMap<(K1, K2, K3), V> ToHashMap <K1, K2, K3, V> (this IEnumerable<(K1, K2, K3, V)> items) Source #
Create an immutable hash-map
method HashMap<(K1, K2, K3, K4), V> ToHashMap <K1, K2, K3, K4, V> (this IEnumerable<(K1, K2, K3, K4, V)> items) Source #
Create an immutable hash-map
method IQueryable<(K Key, V Value)> AsQueryable <K, V> (this HashMap<K, V> source) Source #
Convert to a queryable
class HashMapExtensions Source #
method HashMap<EqKey, Key, V> As <EqKey, Key, V> (this K<HashMapEq<EqKey, Key>, V> ma) Source #
method HashMap<EqK, K, V> ToHashMap <EqK, K, V> (this IEnumerable<(K, V)> items) Source #
Create an immutable hash-map
method HashMap<EqK, (K1, K2), V> ToHashMap <EqK, K1, K2, V> (this IEnumerable<(K1, K2, V)> items) Source #
Create an immutable hash-map
method HashMap<EqK, (K1, K2, K3), V> ToHashMap <EqK, K1, K2, K3, V> (this IEnumerable<(K1, K2, K3, V)> items) Source #
Create an immutable hash-map
method HashMap<EqK, (K1, K2, K3, K4), V> ToHashMap <EqK, K1, K2, K3, K4, V> (this IEnumerable<(K1, K2, K3, K4, V)> items) Source #
Create an immutable hash-map
method IQueryable<(K Key, V Value)> AsQueryable <EqK, K, V> (this HashMap<EqK, K, V> source) Source #
Convert to a queryable
class HashMapExtensions Source #
method HashMap<Key, B> Map <Key, A, B> (this Func<A, B> f, K<HashMap<Key>, A> ma) Source #
Functor map operation
Unwraps the value within the functor, passes it to the map function f
provided, and
then takes the mapped value and wraps it back up into a new functor.
param | ma | Functor to map |
param | f | Mapping function |
returns | Mapped functor |
method HashMap<Key, B> Map <Key, A, B> (this Func<A, B> f, HashMap<Key, A> ma) Source #
Functor map operation
Unwraps the value within the functor, passes it to the map function f
provided, and
then takes the mapped value and wraps it back up into a new functor.
param | ma | Functor to map |
param | f | Mapping function |
returns | Mapped functor |
method HashMap<EqKey, Key, B> Map <EqKey, Key, A, B> (this Func<A, B> f, K<HashMapEq<EqKey, Key>, A> ma) Source #
Functor map operation
Unwraps the value within the functor, passes it to the map function f
provided, and
then takes the mapped value and wraps it back up into a new functor.
param | ma | Functor to map |
param | f | Mapping function |
returns | Mapped functor |
method HashMap<EqKey, Key, B> Map <EqKey, Key, A, B> (this Func<A, B> f, HashMap<EqKey, Key, A> ma) Source #
Functor map operation
Unwraps the value within the functor, passes it to the map function f
provided, and
then takes the mapped value and wraps it back up into a new functor.
param | ma | Functor to map |
param | f | Mapping function |
returns | Mapped functor |
Immutable hash-map module
method HashMap<K, V> clear <K, V> (HashMap<K, V> map) Source #
Clears all items from the map
Functionally equivalent to calling Map.empty as the original structure is untouched
param | map | Map to clear |
returns | Empty map |
method HashMap<K, V> singleton <K, V> ((K, V) value) Source #
Create a singleton collection
param | value | Single value |
returns | Collection with a single item in it |
method HashMap<K, V> singleton <K, V> (K key, V value) Source #
Create a singleton collection
param | value | Single value |
returns | Collection with a single item in it |
method HashMap<K, V> create <K, V> (Tuple<K, V> head, params Tuple<K, V>[] tail) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<K, V> create <K, V> ((K, V) head, params (K, V)[] tail) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<K, V> create <K, V> (KeyValuePair<K, V> head, params KeyValuePair<K, V>[] tail) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<K, V> createRange <K, V> (IEnumerable<Tuple<K, V>> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<K, V> createRange <K, V> (IEnumerable<(K, V)> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<K, V> createRange <K, V> (ReadOnlySpan<(K, V)> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<K, V> createRange <K, V> (IEnumerable<KeyValuePair<K, V>> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<K, V> add <K, V> (HashMap<K, V> map, K key, V value) Source #
Atomically adds a new item to the map
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<K, V> tryAdd <K, V> (HashMap<K, V> map, K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, then the new item is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<K, V> addOrUpdate <K, V> (HashMap<K, V> map, K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, the new item replaces it.
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<K, V> addOrUpdate <K, V> (HashMap<K, V> map, K key, Func<V, V> Some, Func<V> None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method HashMap<K, V> addOrUpdate <K, V> (HashMap<K, V> map, K key, Func<V, V> Some, V None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method HashMap<K, V> addRange <K, V> (HashMap<K, V> map, IEnumerable<Tuple<K, V>> keyValues) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<K, V> addRange <K, V> (HashMap<K, V> map, IEnumerable<(K, V)> keyValues) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<K, V> addRange <K, V> (HashMap<K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<K, V> tryAddRange <K, V> (HashMap<K, V> map, IEnumerable<Tuple<K, V>> keyValues) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<K, V> tryAddRange <K, V> (HashMap<K, V> map, IEnumerable<(K, V)> keyValues) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<K, V> tryAddRange <K, V> (HashMap<K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method HashMap<K, V> addOrUpdateRange <K, V> (HashMap<K, V> map, IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<K, V> addOrUpdateRange <K, V> (HashMap<K, V> map, IEnumerable<(K, V)> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<K, V> addOrUpdateRange <K, V> (HashMap<K, V> map, IEnumerable<KeyValuePair<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method HashMap<K, V> remove <K, V> (HashMap<K, V> map, K key) Source #
Atomically removes an item from the map If the key doesn't exists, the request is ignored.
param | key | Key |
returns | New map with the item removed |
method bool containsKey <K, V> (HashMap<K, V> map, K key) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool contains <K, V> (HashMap<K, V> map, KeyValuePair<K, V> kv) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool contains <K, V> (HashMap<K, V> map, Tuple<K, V> kv) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool contains <K, V> (HashMap<K, V> map, (K, V) kv) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method HashMap<K, V> setItem <K, V> (HashMap<K, V> map, K key, V value) Source #
Atomically updates an existing item
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<K, V> trySetItem <K, V> (HashMap<K, V> map, K key, V value) Source #
Atomically updates an existing item, unless it doesn't exist, in which case it is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<K, V> trySetItem <K, V> (HashMap<K, V> map, K key, Func<V, V> Some) Source #
Atomically sets an item by first retrieving it, applying a map (Some), and then putting it back. Silently fails if the value doesn't exist.
param | key | Key to set |
param | Some | delegate to map the existing value to a new one before setting |
returns | New map with the item set |
method HashMap<K, V> setItems <K, V> (HashMap<K, V> map, IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided
param | items | Items to set |
returns | New map with the items set |
method HashMap<K, V> setItems <K, V> (HashMap<K, V> map, IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided
param | items | Items to set |
returns | New map with the items set |
method HashMap<K, V> setItems <K, V> (HashMap<K, V> map, IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided
param | items | Items to set |
returns | New map with the items set |
method HashMap<K, V> trySetItems <K, V> (HashMap<K, V> map, IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method HashMap<K, V> trySetItems <K, V> (HashMap<K, V> map, IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method HashMap<K, V> trySetItems <K, V> (HashMap<K, V> map, IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided. If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method HashMap<K, V> trySetItems <K, V> (HashMap<K, V> map, IEnumerable<K> keys, Func<V, V> Some) Source #
Atomically sets a series of items using the keys provided to find the items and the Some delegate maps to a new value. If the items don't exist then they're silently ignored.
param | keys | Keys of items to set |
param | Some | Function map the existing item to a new one |
returns | New map with the items set |
method Option<V> find <K, V> (HashMap<K, V> map, K key) Source #
Retrieve a value from the map by key
param | key | Key to find |
returns | Found value |
method R find <K, V, R> (HashMap<K, V> map, K key, Func<V, R> Some, Func<R> None) Source #
Retrieve a value from the map by key and pattern match the result.
param | key | Key to find |
returns | Found value |
method HashMap<K, V> setItem <K, V> (HashMap<K, V> map, K key, Func<V, V> mapper) Source #
Retrieve a value from the map by key, map it to a new value, put it back.
param | key | Key to find |
returns | New map with the mapped value |
method Unit iter <K, V> (HashMap<K, V> map, Action<V> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit iter <K, V> (HashMap<K, V> map, Action<K, V> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method bool forall <K, V> (HashMap<K, V> map, Func<V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool forall <K, V> (HashMap<K, V> map, Func<K, V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool forall <K, V> (HashMap<K, V> map, Func<(K Key, V Value), bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method HashMap<K, U> map <K, T, U> (HashMap<K, T> map, Func<T, U> f) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method HashMap<K, U> map <K, T, U> (HashMap<K, T> map, Func<K, T, U> f) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
Immutable hash-map module
method HashMap<EqK, K, V> clear <EqK, K, V> (HashMap<EqK, K, V> map) Source #
Clears all items from the map
Functionally equivalent to calling Map.empty as the original structure is untouched
param | map | Map to clear |
returns | Empty map |
method HashMap<EqK, K, V> create <EqK, K, V> () Source #
Creates a new empty HashMap
method HashMap<EqK, K, V> singleton <EqK, K, V> (K key, V value) Source #
Create a singleton collection
param | value | Single value |
returns | Collection with a single item in it |
method HashMap<EqK, K, V> create <EqK, K, V> (Tuple<K, V> head, params Tuple<K, V>[] tail) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<EqK, K, V> create <EqK, K, V> ((K, V) head, params (K, V)[] tail) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<EqK, K, V> create <EqK, K, V> (KeyValuePair<K, V> head, params KeyValuePair<K, V>[] tail) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<EqK, K, V> createRange <EqK, K, V> (IEnumerable<Tuple<K, V>> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<EqK, K, V> createRange <EqK, K, V> (IEnumerable<(K, V)> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<EqK, K, V> createRange <EqK, K, V> (ReadOnlySpan<(K, V)> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<EqK, K, V> createRange <EqK, K, V> (IEnumerable<KeyValuePair<K, V>> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method HashMap<EqK, K, V> add <EqK, K, V> (HashMap<EqK, K, V> map, K key, V value) Source #
Atomically adds a new item to the map
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<EqK, K, V> tryAdd <EqK, K, V> (HashMap<EqK, K, V> map, K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, then the new item is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<EqK, K, V> addOrUpdate <EqK, K, V> (HashMap<EqK, K, V> map, K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, the new item replaces it.
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<EqK, K, V> addOrUpdate <EqK, K, V> (HashMap<EqK, K, V> map, K key, Func<V, V> Some, Func<V> None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method HashMap<EqK, K, V> addOrUpdate <EqK, K, V> (HashMap<EqK, K, V> map, K key, Func<V, V> Some, V None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method HashMap<EqK, K, V> addRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<Tuple<K, V>> keyValues) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> addRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<(K, V)> keyValues) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> addRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> tryAddRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<Tuple<K, V>> keyValues) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> tryAddRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<(K, V)> keyValues) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> tryAddRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> addOrUpdateRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> addOrUpdateRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<(K, V)> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
param | range | Range of tuples to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> addOrUpdateRange <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<KeyValuePair<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method HashMap<EqK, K, V> remove <EqK, K, V> (HashMap<EqK, K, V> map, K key) Source #
Atomically removes an item from the map If the key doesn't exists, the request is ignored.
param | key | Key |
returns | New map with the item removed |
method bool containsKey <EqK, K, V> (HashMap<EqK, K, V> map, K key) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool contains <EqK, K, V> (HashMap<EqK, K, V> map, KeyValuePair<K, V> kv) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool contains <EqK, K, V> (HashMap<EqK, K, V> map, Tuple<K, V> kv) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool contains <EqK, K, V> (HashMap<EqK, K, V> map, (K, V) kv) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method HashMap<EqK, K, V> setItem <EqK, K, V> (HashMap<EqK, K, V> map, K key, V value) Source #
Atomically updates an existing item
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<EqK, K, V> trySetItem <EqK, K, V> (HashMap<EqK, K, V> map, K key, V value) Source #
Atomically updates an existing item, unless it doesn't exist, in which case it is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method HashMap<EqK, K, V> trySetItem <EqK, K, V> (HashMap<EqK, K, V> map, K key, Func<V, V> Some) Source #
Atomically sets an item by first retrieving it, applying a map (Some), and then putting it back. Silently fails if the value doesn't exist.
param | key | Key to set |
param | Some | delegate to map the existing value to a new one before setting |
returns | New map with the item set |
method HashMap<EqK, K, V> setItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided
param | items | Items to set |
returns | New map with the items set |
method HashMap<EqK, K, V> setItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided
param | items | Items to set |
returns | New map with the items set |
method HashMap<EqK, K, V> setItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided
param | items | Items to set |
returns | New map with the items set |
method HashMap<EqK, K, V> trySetItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method HashMap<EqK, K, V> trySetItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method HashMap<EqK, K, V> trySetItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided. If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method HashMap<EqK, K, V> trySetItems <EqK, K, V> (HashMap<EqK, K, V> map, IEnumerable<K> keys, Func<V, V> Some) Source #
Atomically sets a series of items using the keys provided to find the items and the Some delegate maps to a new value. If the items don't exist then they're silently ignored.
param | keys | Keys of items to set |
param | Some | Function map the existing item to a new one |
returns | New map with the items set |
method Option<V> find <EqK, K, V> (HashMap<EqK, K, V> map, K key) Source #
Retrieve a value from the map by key
param | key | Key to find |
returns | Found value |
method IEnumerable<V> findSeq <EqK, K, V> (HashMap<EqK, K, V> map, K key) Source #
Retrieve a value from the map by key as an enumerable
param | key | Key to find |
returns | Found value |
method R find <EqK, K, V, R> (HashMap<EqK, K, V> map, K key, Func<V, R> Some, Func<R> None) Source #
Retrieve a value from the map by key and pattern match the result.
param | key | Key to find |
returns | Found value |
method HashMap<EqK, K, V> setItem <EqK, K, V> (HashMap<EqK, K, V> map, K key, Func<V, V> mapper) Source #
Retrieve a value from the map by key, map it to a new value, put it back.
param | key | Key to find |
returns | New map with the mapped value |
method Unit iter <EqK, K, V> (HashMap<EqK, K, V> map, Action<V> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit iter <EqK, K, V> (HashMap<EqK, K, V> map, Action<K, V> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method bool forall <EqK, K, V> (HashMap<EqK, K, V> map, Func<V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool forall <EqK, K, V> (HashMap<EqK, K, V> map, Func<K, V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool forall <EqK, K, V> (HashMap<EqK, K, V> map, Func<(K Key, V Value), bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method HashMap<EqK, K, U> map <EqK, K, T, U> (HashMap<EqK, K, T> map, Func<T, U> f) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method HashMap<EqK, K, U> map <EqK, K, T, U> (HashMap<EqK, K, T> map, Func<K, T, U> f) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method HashMap<EqK, K, V> filter <EqK, K, V> (HashMap<EqK, K, V> map, Func<V, bool> predicate) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method HashMap<EqK, K, V> filter <EqK, K, V> (HashMap<EqK, K, V> map, Func<K, V, bool> predicate) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method int length <EqK, K, T> (HashMap<EqK, K, T> map) Source #
Number of items in the map
method S fold <EqK, S, K, V> (HashMap<EqK, K, V> map, S state, Func<S, K, V, S> folder) Source #
Atomically folds all items in the map (in order) using the folder function provided.
type | S | State type |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method bool exists <EqK, K, V> (HashMap<EqK, K, V> map, Func<K, V, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method HashMap<Key, B> map <Key, A, B> (Func<A, B> f, K<HashMap<Key>, A> ma) Source #
Functor map operation
Unwraps the value within the functor, passes it to the map function f
provided, and
then takes the mapped value and wraps it back up into a new functor.
param | ma | Functor to map |
param | f | Mapping function |
returns | Mapped functor |
method HashMap<EqKey, Key, B> map <EqKey, Key, A, B> (this Func<A, B> f, K<HashMapEq<EqKey, Key>, A> ma) Source #
Functor map operation
Unwraps the value within the functor, passes it to the map function f
provided, and
then takes the mapped value and wraps it back up into a new functor.
param | ma | Functor to map |
param | f | Mapping function |
returns | Mapped functor |