- HashMap <K, V>
- Empty = new HashMap<K,V>(TrieMap<EqDefault<K>, 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
- Length
- ToReadOnlyDictionary ()
- 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 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)
- 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 (V value)
- Contains <EqV> (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 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 (KeyValuePair<K, V> pair)
- Keys
- Values
- ToDictionary ()
- 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<K, V> lhs, HashMap<K, V> rhs)
- != (HashMap<K, V> lhs, HashMap<K, V> rhs)
- + (HashMap<K, V> lhs, HashMap<K, V> rhs)
- Append (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<Tuple<K, V>, bool> pred)
- ForAll (Func<(K Key, V Value), bool> pred)
- ForAll (Func<KeyValuePair<K, V>, bool> pred)
- ForAll (Func<V, bool> pred)
- Exists (Func<K, V, bool> pred)
- Exists (Func<Tuple<K, V>, bool> pred)
- Exists (Func<(K Key, V Value), bool> pred)
- Exists (Func<KeyValuePair<K, V>, 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)
- Fold <S> (S state, Func<S, V, S> folder)
- HashMap <EqK, K, V>
- Empty = new HashMap<EqK, K, V>(TrieMap<EqK, K, V>.Empty)
- HashMap (IEnumerable<(K Key, V Value)> items)
- HashMap (IEnumerable<(K Key, V Value)> items, bool tryAdd)
- this []
- IsEmpty
- Count
- Length
- ToReadOnlyDictionary ()
- 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 ()
- 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)
- Append (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<Tuple<K, V>, bool> pred)
- ForAll (Func<(K Key, V Value), bool> pred)
- ForAll (Func<KeyValuePair<K, V>, bool> pred)
- ForAll (Func<V, bool> pred)
- Exists (Func<K, V, bool> pred)
- Exists (Func<Tuple<K, V>, bool> pred)
- Exists (Func<(K Key, V Value), bool> pred)
- Exists (Func<KeyValuePair<K, V>, 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)
- Fold <S> (S state, Func<S, V, S> folder)
- HashMapExtensions
- ToHashMap <K, V> (this IEnumerable<(K, V)> items)
- ToHashMap <K, V> (this IEnumerable<Tuple<K, V>> items)
- ToHashMap <K, V> (this IEnumerable<KeyValuePair<K, V>> items)
- ToHashMap <K1, K2, V> (this IEnumerable<(K1, K2, V)> items)
- ToHashMap <K1, K2, V> (this IEnumerable<Tuple<K1, K2, V>> items)
- ToHashMap <K1, K2, K3, V> (this IEnumerable<(K1, K2, K3, V)> items)
- ToHashMap <K1, K2, K3, V> (this IEnumerable<Tuple<K1, K2, K3, V>> items)
- ToHashMap <K1, K2, K3, K4, V> (this IEnumerable<(K1, K2, K3, K4, V)> items)
- ToHashMap <K1, K2, K3, K4, V> (this IEnumerable<Tuple<K1, K2, K3, K4, V>> items)
- Count <K, V> (this HashMap<K, V> self)
- Sum <K> (this HashMap<K, int> self)
- Find <A, B, T> (this HashMap<A, HashMap<B, T>> self, A outerKey, B innerKey)
- Find <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, A aKey, B bKey, C cKey)
- Find <A, B, T, R> (this HashMap<A, HashMap<B, T>> self, A outerKey, B innerKey, Func<T, R> Some, Func<R> None)
- Find <A, B, C, T, R> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, A aKey, B bKey, C cKey, Func<T, R> Some, Func<R> None)
- Find <A, B, C, D, T, R> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, A aKey, B bKey, C cKey, D dKey, Func<T, R> Some, Func<R> None)
- AddOrUpdate <A, B, T> (this HashMap<A, HashMap<B, T>> self, A outerKey, B innerKey, Func<T, T> Some, Func<T> None)
- AddOrUpdate <A, B, T> (this HashMap<A, HashMap<B, T>> self, A outerKey, B innerKey, T value)
- AddOrUpdate <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, A aKey, B bKey, C cKey, T value)
- AddOrUpdate <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, A aKey, B bKey, C cKey, Func<T, T> Some, Func<T> None)
- AddOrUpdate <A, B, C, D, T> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, A aKey, B bKey, C cKey, D dKey, T value)
- AddOrUpdate <A, B, C, D, T> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, A aKey, B bKey, C cKey, D dKey, Func<T, T> Some, Func<T> None)
- Remove <A, B, T> (this HashMap<A, HashMap<B, T>> self, A outerKey, B innerKey)
- Remove <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, A aKey, B bKey, C cKey)
- MapRemoveT <A, B, T, V> (this HashMap<A, HashMap<B, T>> self, Func<HashMap<B, T>, HashMap<B, V>> map)
- MapRemoveT <A, B, C, T, V> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, Func<HashMap<C, T>, HashMap<C, V>> map)
- MapRemoveT <A, B, C, D, T, V> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, Func<HashMap<D, T>, HashMap<D, V>> map)
- MapT <A, B, T, V> (this HashMap<A, HashMap<B, T>> self, Func<T, V> map)
- MapT <A, B, C, T, V> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, Func<T, V> map)
- MapT <A, B, C, D, T, V> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, Func<T, V> map)
- FilterT <A, B, T> (this HashMap<A, HashMap<B, T>> self, Func<T, bool> pred)
- FilterT <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, Func<T, bool> pred)
- FilterT <A, B, C, D, T> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, Func<T, bool> pred)
- FilterRemoveT <A, B, T> (this HashMap<A, HashMap<B, T>> self, Func<T, bool> pred)
- FilterRemoveT <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, Func<T, bool> pred)
- FilterRemoveT <A, B, C, D, T> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, Func<T, bool> pred)
- Exists <A, B, T> (this HashMap<A, HashMap<B, T>> self, Func<T, bool> pred)
- Exists <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, Func<T, bool> pred)
- Exists <A, B, C, D, T> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, Func<T, bool> pred)
- ForAll <A, B, T> (this HashMap<A, HashMap<B, T>> self, Func<T, bool> pred)
- ForAll <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, Func<T, bool> pred)
- ForAll <A, B, C, D, T> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, Func<T, bool> pred)
- SetItemT <A, B, V> (this HashMap<A, HashMap<B, V>> map, A aKey, B bKey, V value)
- SetItemT <A, B, C, V> (this HashMap<A, HashMap<B, HashMap<C, V>>> map, A aKey, B bKey, C cKey, V value)
- SetItemT <A, B, C, D, V> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, V value)
- SetItemT <A, B, V> (this HashMap<A, HashMap<B, V>> map, A aKey, B bKey, Func<V, V> Some)
- SetItemT <A, B, C, V> (this HashMap<A, HashMap<B, HashMap<C, V>>> map, A aKey, B bKey, C cKey, Func<V, V> Some)
- SetItemT <A, B, C, D, V> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, Func<V, V> Some)
- TrySetItemT <A, B, V> (this HashMap<A, HashMap<B, V>> map, A aKey, B bKey, V value)
- TrySetItemT <A, B, C, V> (this HashMap<A, HashMap<B, HashMap<C, V>>> map, A aKey, B bKey, C cKey, V value)
- TrySetItemT <A, B, C, D, V> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, V value)
- TrySetItemT <A, B, V> (this HashMap<A, HashMap<B, V>> map, A aKey, B bKey, Func<V, V> Some)
- TrySetItemT <A, B, C, V> (this HashMap<A, HashMap<B, HashMap<C, V>>> map, A aKey, B bKey, C cKey, Func<V, V> Some)
- TrySetItemT <A, B, C, D, V> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, Func<V, V> Some)
- FoldT <A, B, S, V> (this HashMap<A, HashMap<B, V>> map, S state, Func<S, V, S> folder)
- FoldT <A, B, C, S, V> (this HashMap<A, HashMap<B, HashMap<C, V>>> map, S state, Func<S, V, S> folder)
- FoldT <A, B, C, D, S, V> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> map, S state, Func<S, V, S> folder)
- HashMapEqExtensions
- HashMap
- clear <K, V> (HashMap<K, V> map)
- empty <K, V> ()
- 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> (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)
- findSeq <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<Tuple<K, V>, bool> pred)
- forall <K, V> (HashMap<K, V> map, Func<(K Key, V Value), bool> pred)
- forall <K, V> (HashMap<K, V> map, Func<KeyValuePair<K, V>, 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)
- length <K, T> (HashMap<K, T> map)
- fold <S, K, V> (HashMap<K, V> map, S state, Func<S, K, V, S> folder)
- fold <S, K, V> (HashMap<K, V> map, S state, Func<S, V, S> folder)
- exists <K, V> (HashMap<K, V> map, Func<K, V, bool> pred)
- exists <K, V> (HashMap<K, V> map, Func<Tuple<K, V>, bool> pred)
- exists <K, V> (HashMap<K, V> map, Func<(K Key, V Value), bool> pred)
- exists <K, V> (HashMap<K, V> map, Func<KeyValuePair<K, V>, bool> pred)
- exists <K, V> (HashMap<K, V> map, Func<V, bool> pred)
- HashMap
- clear <EqK, K, V> (HashMap<EqK, K, V> map)
- empty <EqK, K, V> ()
- create <EqK, K, V> ()
- 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> (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<Tuple<K, V>, bool> pred)
- forall <EqK, K, V> (HashMap<EqK, K, V> map, Func<(K Key, V Value), bool> pred)
- forall <EqK, K, V> (HashMap<EqK, K, V> map, Func<KeyValuePair<K, V>, 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)
- fold <EqK, S, K, V> (HashMap<EqK, K, V> map, S state, Func<S, 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<Tuple<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<KeyValuePair<K, V>, bool> pred)
- exists <EqK, K, V> (HashMap<EqK, K, V> map, Func<V, bool> pred)
struct HashMap <K, V> Source #
Unsorted immutable hash-map
type | K | Key type |
type | V | Value |
field HashMap<K, V> Empty = new HashMap<K,V>(TrieMap<EqDefault<K>, K, V>.Empty) Source #
method Lens<HashMap<K, V>, Option<V>> itemOrNone (K key) Source #
Item or none at index lens
method IReadOnlyDictionary<K, V> ToReadOnlyDictionary () Source #
Get a IReadOnlyDictionary for this map. No mapping is required, so this is very fast.
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 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 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 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 IEnumerable<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<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 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<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 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> 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 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 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 (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> (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 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> 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<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 (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 IReadOnlyDictionary<K, V> ToDictionary () Source #
Convert the map to an IDictionary
returns |
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 IEnumerable<(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<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<Tuple<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<KeyValuePair<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<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<Tuple<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<KeyValuePair<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<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 |
struct HashMap <EqK, K, V> Source #
Unsorted immutable hash-map
type | K | Key type |
type | V | Value |
field HashMap<EqK, K, V> Empty = new HashMap<EqK, K, V>(TrieMap<EqK, K, V>.Empty) Source #
method IReadOnlyDictionary<K, V> ToReadOnlyDictionary () Source #
Get a IReadOnlyDictionary for this map. No mapping is required, so this is very fast.
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 IEnumerable<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 IReadOnlyDictionary<K, V> ToDictionary () Source #
Convert the map to an IReadOnlyDictionary<K, V>
returns |
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 IEnumerable<(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<Tuple<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<KeyValuePair<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<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<Tuple<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<KeyValuePair<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<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 |
class HashMapExtensions Source #
method HashMap<K, V> ToHashMap <K, V> (this IEnumerable<(K, V)> items) Source #
Create an immutable hash-map
method HashMap<K, V> ToHashMap <K, V> (this IEnumerable<Tuple<K, V>> items) Source #
Create an immutable hash-map
method HashMap<K, V> ToHashMap <K, V> (this IEnumerable<KeyValuePair<K, V>> items) Source #
Create an immutable hash-map
method HashMap<K1, HashMap<K2, V>> ToHashMap <K1, K2, V> (this IEnumerable<(K1, K2, V)> items) Source #
Create an immutable hash-map
method HashMap<K1, HashMap<K2, V>> ToHashMap <K1, K2, V> (this IEnumerable<Tuple<K1, K2, V>> items) Source #
Create an immutable hash-map
method HashMap<K1, HashMap<K2, HashMap<K3, V>>> ToHashMap <K1, K2, K3, V> (this IEnumerable<(K1, K2, K3, V)> items) Source #
Create an immutable hash-map
method HashMap<K1, HashMap<K2, HashMap<K3, V>>> ToHashMap <K1, K2, K3, V> (this IEnumerable<Tuple<K1, K2, K3, V>> items) Source #
Create an immutable hash-map
method HashMap<K1, HashMap<K2, HashMap<K3, HashMap<K4, V>>>> ToHashMap <K1, K2, K3, K4, V> (this IEnumerable<(K1, K2, K3, K4, V)> items) Source #
Create an immutable hash-map
method HashMap<K1, HashMap<K2, HashMap<K3, HashMap<K4, V>>>> ToHashMap <K1, K2, K3, K4, V> (this IEnumerable<Tuple<K1, K2, K3, K4, V>> items) Source #
Create an immutable hash-map
method Option<T> Find <A, B, T> (this HashMap<A, HashMap<B, T>> self, A outerKey, B innerKey) Source #
method Option<T> Find <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, A aKey, B bKey, C cKey) Source #
method R Find <A, B, T, R> (this HashMap<A, HashMap<B, T>> self, A outerKey, B innerKey, Func<T, R> Some, Func<R> None) Source #
method R Find <A, B, C, T, R> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, A aKey, B bKey, C cKey, Func<T, R> Some, Func<R> None) Source #
method R Find <A, B, C, D, T, R> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, A aKey, B bKey, C cKey, D dKey, Func<T, R> Some, Func<R> None) Source #
method HashMap<A, HashMap<B, T>> AddOrUpdate <A, B, T> (this HashMap<A, HashMap<B, T>> self, A outerKey, B innerKey, Func<T, T> Some, Func<T> None) Source #
method HashMap<A, HashMap<B, T>> AddOrUpdate <A, B, T> (this HashMap<A, HashMap<B, T>> self, A outerKey, B innerKey, T value) Source #
method HashMap<A, HashMap<B, HashMap<C, T>>> AddOrUpdate <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, A aKey, B bKey, C cKey, T value) Source #
method HashMap<A, HashMap<B, HashMap<C, T>>> AddOrUpdate <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, A aKey, B bKey, C cKey, Func<T, T> Some, Func<T> None) Source #
method HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> AddOrUpdate <A, B, C, D, T> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, A aKey, B bKey, C cKey, D dKey, T value) Source #
method HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> AddOrUpdate <A, B, C, D, T> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, A aKey, B bKey, C cKey, D dKey, Func<T, T> Some, Func<T> None) Source #
method HashMap<A, HashMap<B, T>> Remove <A, B, T> (this HashMap<A, HashMap<B, T>> self, A outerKey, B innerKey) Source #
method HashMap<A, HashMap<B, HashMap<C, T>>> Remove <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, A aKey, B bKey, C cKey) Source #
method HashMap<A, HashMap<B, V>> MapRemoveT <A, B, T, V> (this HashMap<A, HashMap<B, T>> self, Func<HashMap<B, T>, HashMap<B, V>> map) Source #
method HashMap<A, HashMap<B, HashMap<C, V>>> MapRemoveT <A, B, C, T, V> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, Func<HashMap<C, T>, HashMap<C, V>> map) Source #
method HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> MapRemoveT <A, B, C, D, T, V> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, Func<HashMap<D, T>, HashMap<D, V>> map) Source #
method HashMap<A, HashMap<B, V>> MapT <A, B, T, V> (this HashMap<A, HashMap<B, T>> self, Func<T, V> map) Source #
method HashMap<A, HashMap<B, HashMap<C, V>>> MapT <A, B, C, T, V> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, Func<T, V> map) Source #
method HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> MapT <A, B, C, D, T, V> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, Func<T, V> map) Source #
method HashMap<A, HashMap<B, T>> FilterT <A, B, T> (this HashMap<A, HashMap<B, T>> self, Func<T, bool> pred) Source #
method HashMap<A, HashMap<B, HashMap<C, T>>> FilterT <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, Func<T, bool> pred) Source #
method HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> FilterT <A, B, C, D, T> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, Func<T, bool> pred) Source #
method HashMap<A, HashMap<B, T>> FilterRemoveT <A, B, T> (this HashMap<A, HashMap<B, T>> self, Func<T, bool> pred) Source #
method HashMap<A, HashMap<B, HashMap<C, T>>> FilterRemoveT <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, Func<T, bool> pred) Source #
method HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> FilterRemoveT <A, B, C, D, T> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, Func<T, bool> pred) Source #
method bool Exists <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, Func<T, bool> pred) Source #
method bool Exists <A, B, C, D, T> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, Func<T, bool> pred) Source #
method bool ForAll <A, B, C, T> (this HashMap<A, HashMap<B, HashMap<C, T>>> self, Func<T, bool> pred) Source #
method bool ForAll <A, B, C, D, T> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, T>>>> self, Func<T, bool> pred) Source #
method HashMap<A, HashMap<B, V>> SetItemT <A, B, V> (this HashMap<A, HashMap<B, V>> map, A aKey, B bKey, V value) Source #
method HashMap<A, HashMap<B, HashMap<C, V>>> SetItemT <A, B, C, V> (this HashMap<A, HashMap<B, HashMap<C, V>>> map, A aKey, B bKey, C cKey, V value) Source #
method HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> SetItemT <A, B, C, D, V> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, V value) Source #
method HashMap<A, HashMap<B, V>> SetItemT <A, B, V> (this HashMap<A, HashMap<B, V>> map, A aKey, B bKey, Func<V, V> Some) Source #
method HashMap<A, HashMap<B, HashMap<C, V>>> SetItemT <A, B, C, V> (this HashMap<A, HashMap<B, HashMap<C, V>>> map, A aKey, B bKey, C cKey, Func<V, V> Some) Source #
method HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> SetItemT <A, B, C, D, V> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, Func<V, V> Some) Source #
method HashMap<A, HashMap<B, V>> TrySetItemT <A, B, V> (this HashMap<A, HashMap<B, V>> map, A aKey, B bKey, V value) Source #
method HashMap<A, HashMap<B, HashMap<C, V>>> TrySetItemT <A, B, C, V> (this HashMap<A, HashMap<B, HashMap<C, V>>> map, A aKey, B bKey, C cKey, V value) Source #
method HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> TrySetItemT <A, B, C, D, V> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, V value) Source #
method HashMap<A, HashMap<B, V>> TrySetItemT <A, B, V> (this HashMap<A, HashMap<B, V>> map, A aKey, B bKey, Func<V, V> Some) Source #
method HashMap<A, HashMap<B, HashMap<C, V>>> TrySetItemT <A, B, C, V> (this HashMap<A, HashMap<B, HashMap<C, V>>> map, A aKey, B bKey, C cKey, Func<V, V> Some) Source #
method HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> TrySetItemT <A, B, C, D, V> (this HashMap<A, HashMap<B, HashMap<C, HashMap<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, Func<V, V> Some) Source #
method S FoldT <A, B, S, V> (this HashMap<A, HashMap<B, V>> map, S state, Func<S, V, S> folder) Source #
class HashMapEqExtensions Source #
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> 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> (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 IEnumerable<V> findSeq <K, V> (HashMap<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 <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<Tuple<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 bool forall <K, V> (HashMap<K, V> map, Func<KeyValuePair<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 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 |
method HashMap<K, V> filter <K, V> (HashMap<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<K, V> filter <K, V> (HashMap<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 S fold <S, K, V> (HashMap<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 S fold <S, K, V> (HashMap<K, V> map, S state, Func<S, 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 <K, V> (HashMap<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 bool exists <K, V> (HashMap<K, V> map, Func<Tuple<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 <K, V> (HashMap<K, V> map, 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 |
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> empty <EqK, K, V> () Source #
Creates a new empty Map
method HashMap<EqK, K, V> create <EqK, K, V> () Source #
Creates a new empty HashMap
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> (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<Tuple<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 bool forall <EqK, K, V> (HashMap<EqK, K, V> map, Func<KeyValuePair<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 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 S fold <EqK, S, K, V> (HashMap<EqK, K, V> map, S state, Func<S, 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 bool exists <EqK, K, V> (HashMap<EqK, K, V> map, Func<Tuple<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 <EqK, K, V> (HashMap<EqK, K, V> map, 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 <EqK, K, V> (HashMap<EqK, K, V> map, Func<KeyValuePair<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 |