HashMap<K, V> Struct

Unsorted immutable hash-map

DECLARATION
public struct HashMap<K, V> : IEnumerable<ValueTuple<K, V>>,
IEquatable<HashMap<K, V>>
NAMESPACE
LanguageExt

Constructors

HashMap(IEnumerable<ValueTuple<K, V>>)
PARAMETERS
items
IEnumerable<ValueTuple<K, V>>
DECLARATION
public ctor HashMap(IEnumerable<ValueTuple<K, V>> items)

Fields

Empty
DECLARATION
public static readonly HashMap<K, V> Empty

Properties

Count
SUMMARY

Number of items in the map

DECLARATION
[Pure]
public int Count { get; }
RETURNS
int
IsEmpty
SUMMARY

Is the map empty

DECLARATION
[Pure]
public bool IsEmpty { get; }
RETURNS
bool
Keys
SUMMARY

Enumerable of map keys

DECLARATION
[Pure]
public IEnumerable<K> Keys { get; }
RETURNS
IEnumerable<K>
Length
SUMMARY

Alias of Count

DECLARATION
[Pure]
public int Length { get; }
RETURNS
int
this
SUMMARY

'this' accessor

DECLARATION
[Pure]
public V this [K key] { get; }
RETURNS
V
Optional value
Values
SUMMARY

Enumerable of map values

DECLARATION
[Pure]
public IEnumerable<V> Values { get; }
RETURNS
IEnumerable<V>

Methods

Add(K, V)
SUMMARY

Atomically adds a new item to the map

PARAMETERS
key
K
Key
value
V
Value
REMARKS
Null is not allowed for a Key or a Value
DECLARATION
[Pure]
public HashMap<K, V> Add(K key, V value)
RETURNS
HashMap<K, V>
New Map with the item added
EXCEPTIONS
ArgumentException
Throws ArgumentException if the key already exists
ArgumentNullException
Throws ArgumentNullException the key or value are null
AddOrUpdate(K, V)
SUMMARY

Atomically adds a new item to the map. If the key already exists, the new item replaces it.

PARAMETERS
key
K
Key
value
V
Value
REMARKS
Null is not allowed for a Key or a Value
DECLARATION
[Pure]
public HashMap<K, V> AddOrUpdate(K key, V value)
RETURNS
HashMap<K, V>
New Map with the item added
EXCEPTIONS
ArgumentNullException
Throws ArgumentNullException the key or value are null
AddOrUpdate(K, Func<V, V>, Func<V>)
SUMMARY

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.

PARAMETERS
key
K
Key to find
Some
Func<V, V>
None
Func<V>
DECLARATION
[Pure]
public HashMap<K, V> AddOrUpdate(K key, Func<V, V> Some, Func<V> None)
RETURNS
HashMap<K, V>
New map with the mapped value
EXCEPTIONS
Exception
Throws Exception if None returns null
Exception
Throws Exception if Some returns null
AddOrUpdate(K, Func<V, V>, V)
SUMMARY

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.

PARAMETERS
key
K
Key to find
Some
Func<V, V>
None
V
DECLARATION
[Pure]
public HashMap<K, V> AddOrUpdate(K key, Func<V, V> Some, V None)
RETURNS
HashMap<K, V>
New map with the mapped value
EXCEPTIONS
ArgumentNullException
Throws ArgumentNullException if None is null
Exception
Throws Exception if Some returns null
AddOrUpdateRange(IEnumerable<Tuple<K, V>>)
SUMMARY

Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.

PARAMETERS
range
IEnumerable<Tuple<K, V>>
Range of tuples to add
REMARKS
Null is not allowed for a Key or a Value
DECLARATION
[Pure]
public HashMap<K, V> AddOrUpdateRange(IEnumerable<Tuple<K, V>> range)
RETURNS
HashMap<K, V>
New Map with the items added
EXCEPTIONS
ArgumentNullException
Throws ArgumentNullException the keys or values are null
AddOrUpdateRange(IEnumerable<ValueTuple<K, V>>)
SUMMARY

Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.

PARAMETERS
range
IEnumerable<ValueTuple<K, V>>
Range of tuples to add
REMARKS
Null is not allowed for a Key or a Value
DECLARATION
[Pure]
public HashMap<K, V> AddOrUpdateRange(IEnumerable<ValueTuple<K, V>> range)
RETURNS
HashMap<K, V>
New Map with the items added
EXCEPTIONS
ArgumentNullException
Throws ArgumentNullException the keys or values are null
AddOrUpdateRange(IEnumerable<KeyValuePair<K, V>>)
SUMMARY

Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.

PARAMETERS
range
IEnumerable<KeyValuePair<K, V>>
Range of KeyValuePairs to add
REMARKS
Null is not allowed for a Key or a Value
DECLARATION
[Pure]
public HashMap<K, V> AddOrUpdateRange(IEnumerable<KeyValuePair<K, V>> range)
RETURNS
HashMap<K, V>
New Map with the items added
EXCEPTIONS
ArgumentNullException
Throws ArgumentNullException the keys or values are null
AddRange(IEnumerable<Tuple<K, V>>)
SUMMARY

Atomically adds a range of items to the map.

PARAMETERS
range
IEnumerable<Tuple<K, V>>
Range of tuples to add
REMARKS
Null is not allowed for a Key or a Value
DECLARATION
[Pure]
public HashMap<K, V> AddRange(IEnumerable<Tuple<K, V>> range)
RETURNS
HashMap<K, V>
New Map with the items added
EXCEPTIONS
ArgumentException
Throws ArgumentException if any of the keys already exist
ArgumentNullException
Throws ArgumentNullException the keys or values are null
AddRange(IEnumerable<ValueTuple<K, V>>)
SUMMARY

Atomically adds a range of items to the map.

PARAMETERS
range
IEnumerable<ValueTuple<K, V>>
Range of tuples to add
REMARKS
Null is not allowed for a Key or a Value
DECLARATION
[Pure]
public HashMap<K, V> AddRange(IEnumerable<ValueTuple<K, V>> range)
RETURNS
HashMap<K, V>
New Map with the items added
EXCEPTIONS
ArgumentException
Throws ArgumentException if any of the keys already exist
ArgumentNullException
Throws ArgumentNullException the keys or values are null
AddRange(IEnumerable<KeyValuePair<K, V>>)
SUMMARY

Atomically adds a range of items to the map

PARAMETERS
pairs
IEnumerable<KeyValuePair<K, V>>
Range of KeyValuePairs to add
DECLARATION
[Pure]
public HashMap<K, V> AddRange(IEnumerable<KeyValuePair<K, V>> pairs)
RETURNS
HashMap<K, V>
New Map with the items added
EXCEPTIONS
ArgumentException
Throws ArgumentException if any of the keys already exist
Append(HashMap<K, V>)
PARAMETERS
rhs
HashMap<K, V>
DECLARATION
[Pure]
public HashMap<K, V> Append(HashMap<K, V> rhs)
RETURNS
HashMap<K, V>
AsEnumerable()
DECLARATION
[Pure]
public IEnumerable<ValueTuple<K, V>> AsEnumerable()
RETURNS
IEnumerable<ValueTuple<K, V>>
Clear()
SUMMARY

Clears all items from the map

REMARKS
Functionally equivalent to calling Map.empty as the original structure is untouched
DECLARATION
[Pure]
public HashMap<K, V> Clear()
RETURNS
HashMap<K, V>
Empty map
Contains(K, V)
SUMMARY

Checks for existence of a key in the map

PARAMETERS
key
K
Key to check
value
V
DECLARATION
[Pure]
public bool Contains(K key, V value)
RETURNS
bool
True if an item with the key supplied is in the map
Contains(KeyValuePair<K, V>)
SUMMARY

Returns true if a Key/Value pair exists in the map

PARAMETERS
pair
KeyValuePair<K, V>
Pair to find
DECLARATION
[Pure]
public bool Contains(KeyValuePair<K, V> pair)
RETURNS
bool
True if exists, false otherwise
ContainsKey(K)
SUMMARY

Checks for existence of a key in the map

PARAMETERS
key
K
Key to check
DECLARATION
[Pure]
public bool ContainsKey(K key)
RETURNS
bool
True if an item with the key supplied is in the map
Equals(object)
PARAMETERS
obj
object
DECLARATION
[Pure]
public override bool Equals(object obj)
RETURNS
bool
Equals(HashMap<K, V>)
PARAMETERS
other
HashMap<K, V>
DECLARATION
[Pure]
public bool Equals(HashMap<K, V> other)
RETURNS
bool
Exists(Func<K, V, bool>)
SUMMARY

Return true if *any* items in the map return true when the predicate is applied

PARAMETERS
pred
Func<K, V, bool>
Predicate
DECLARATION
public bool Exists(Func<K, V, bool> pred)
RETURNS
bool
True if all items in the map return true when the predicate is applied
Exists(Func<Tuple<K, V>, bool>)
SUMMARY

Return true if *any* items in the map return true when the predicate is applied

PARAMETERS
pred
Func<Tuple<K, V>, bool>
Predicate
DECLARATION
[Pure]
public bool Exists(Func<Tuple<K, V>, bool> pred)
RETURNS
bool
True if all items in the map return true when the predicate is applied
Exists(Func<ValueTuple<K, V>, bool>)
SUMMARY

Return true if *any* items in the map return true when the predicate is applied

PARAMETERS
pred
Func<ValueTuple<K, V>, bool>
Predicate
DECLARATION
[Pure]
public bool Exists(Func<ValueTuple<K, V>, bool> pred)
RETURNS
bool
True if all items in the map return true when the predicate is applied
Exists(Func<KeyValuePair<K, V>, bool>)
SUMMARY

Return true if *any* items in the map return true when the predicate is applied

PARAMETERS
pred
Func<KeyValuePair<K, V>, bool>
Predicate
DECLARATION
[Pure]
public bool Exists(Func<KeyValuePair<K, V>, bool> pred)
RETURNS
bool
True if all items in the map return true when the predicate is applied
Exists(Func<V, bool>)
SUMMARY

Return true if *any* items in the map return true when the predicate is applied

PARAMETERS
pred
Func<V, bool>
Predicate
DECLARATION
[Pure]
public bool Exists(Func<V, bool> pred)
RETURNS
bool
True if all items in the map return true when the predicate is applied
Filter(Func<V, bool>)
SUMMARY

Atomically filter out items that return false when a predicate is applied

PARAMETERS
pred
Func<V, bool>
Predicate
DECLARATION
[Pure]
public HashMap<K, V> Filter(Func<V, bool> pred)
RETURNS
HashMap<K, V>
New map with items filtered
Filter(Func<K, V, bool>)
SUMMARY

Atomically filter out items that return false when a predicate is applied

PARAMETERS
pred
Func<K, V, bool>
Predicate
DECLARATION
[Pure]
public HashMap<K, V> Filter(Func<K, V, bool> pred)
RETURNS
HashMap<K, V>
New map with items filtered
Find(K)
SUMMARY

Retrieve a value from the map by key

PARAMETERS
key
K
Key to find
DECLARATION
[Pure]
public Option<V> Find(K key)
RETURNS
Option<V>
Found value
Find<R>(K, Func<V, R>, Func<R>)
SUMMARY

Retrieve a value from the map by key and pattern match the result.

PARAMETERS
key
K
Key to find
Some
Func<V, R>
None
Func<R>
DECLARATION
[Pure]
public R Find<R>(K key, Func<V, R> Some, Func<R> None)
RETURNS
R
Found value
FindSeq(K)
SUMMARY

Retrieve a value from the map by key as an enumerable

PARAMETERS
key
K
Key to find
DECLARATION
[Pure]
public IEnumerable<V> FindSeq(K key)
RETURNS
IEnumerable<V>
Found value
Fold<S>(S, Func<S, K, V, S>)
SUMMARY

Atomically folds all items in the map (in order) using the folder function provided.

PARAMETERS
state
S
Initial state
folder
Func<S, K, V, S>
Fold function
DECLARATION
[Pure]
public S Fold<S>(S state, Func<S, K, V, S> folder)
RETURNS
S
Folded state
Fold<S>(S, Func<S, V, S>)
SUMMARY

Atomically folds all items in the map (in order) using the folder function provided.

PARAMETERS
state
S
Initial state
folder
Func<S, V, S>
Fold function
DECLARATION
[Pure]
public S Fold<S>(S state, Func<S, V, S> folder)
RETURNS
S
Folded state
ForAll(Func<K, V, bool>)
SUMMARY

Return true if all items in the map return true when the predicate is applied

PARAMETERS
pred
Func<K, V, bool>
Predicate
DECLARATION
[Pure]
public bool ForAll(Func<K, V, bool> pred)
RETURNS
bool
True if all items in the map return true when the predicate is applied
ForAll(Func<Tuple<K, V>, bool>)
SUMMARY

Return true if all items in the map return true when the predicate is applied

PARAMETERS
pred
Func<Tuple<K, V>, bool>
Predicate
DECLARATION
[Pure]
public bool ForAll(Func<Tuple<K, V>, bool> pred)
RETURNS
bool
True if all items in the map return true when the predicate is applied
ForAll(Func<ValueTuple<K, V>, bool>)
SUMMARY

Return true if all items in the map return true when the predicate is applied

PARAMETERS
pred
Func<ValueTuple<K, V>, bool>
Predicate
DECLARATION
[Pure]
public bool ForAll(Func<ValueTuple<K, V>, bool> pred)
RETURNS
bool
True if all items in the map return true when the predicate is applied
ForAll(Func<KeyValuePair<K, V>, bool>)
SUMMARY

Return true if *all* items in the map return true when the predicate is applied

PARAMETERS
pred
Func<KeyValuePair<K, V>, bool>
Predicate
DECLARATION
[Pure]
public bool ForAll(Func<KeyValuePair<K, V>, bool> pred)
RETURNS
bool
True if all items in the map return true when the predicate is applied
ForAll(Func<V, bool>)
SUMMARY

Return true if all items in the map return true when the predicate is applied

PARAMETERS
pred
Func<V, bool>
Predicate
DECLARATION
[Pure]
public bool ForAll(Func<V, bool> pred)
RETURNS
bool
True if all items in the map return true when the predicate is applied
GetEnumerator()
SUMMARY

GetEnumerator - IEnumerable interface

DECLARATION
public IEnumerator<ValueTuple<K, V>> GetEnumerator()
RETURNS
IEnumerator<ValueTuple<K, V>>
GetHashCode()
DECLARATION
[Pure]
public override int GetHashCode()
RETURNS
int
Iter(Action<K, V>)
SUMMARY

Atomically iterate through all key/value pairs in the map (in order) and execute an action on each

PARAMETERS
action
Action<K, V>
Action to execute
DECLARATION
public Unit Iter(Action<K, V> action)
Iter(Action<V>)
SUMMARY

Atomically iterate through all values in the map (in order) and execute an action on each

PARAMETERS
action
Action<V>
Action to execute
DECLARATION
public Unit Iter(Action<V> action)
Iter(Action<Tuple<K, V>>)
SUMMARY

Atomically iterate through all key/value pairs (as tuples) in the map (in order) and execute an action on each

PARAMETERS
action
Action<Tuple<K, V>>
Action to execute
DECLARATION
public Unit Iter(Action<Tuple<K, V>> action)
Iter(Action<ValueTuple<K, V>>)
SUMMARY

Atomically iterate through all key/value pairs (as tuples) in the map (in order) and execute an action on each

PARAMETERS
action
Action<ValueTuple<K, V>>
Action to execute
DECLARATION
public Unit Iter(Action<ValueTuple<K, V>> action)
Iter(Action<KeyValuePair<K, V>>)
SUMMARY

Atomically iterate through all key/value pairs in the map (in order) and execute an action on each

PARAMETERS
action
Action<KeyValuePair<K, V>>
Action to execute
DECLARATION
public Unit Iter(Action<KeyValuePair<K, V>> action)
Map<U>(Func<V, U>)
SUMMARY

Atomically maps the map to a new map

PARAMETERS
mapper
Func<V, U>
DECLARATION
[Pure]
public HashMap<K, U> Map<U>(Func<V, U> mapper)
RETURNS
HashMap<K, U>
Mapped items in a new map
Map<U>(Func<K, V, U>)
SUMMARY

Atomically maps the map to a new map

PARAMETERS
mapper
Func<K, V, U>
DECLARATION
[Pure]
public HashMap<K, U> Map<U>(Func<K, V, U> mapper)
RETURNS
HashMap<K, U>
Mapped items in a new map
Remove(K)
SUMMARY

Atomically removes an item from the map If the key doesn't exists, the request is ignored.

PARAMETERS
key
K
Key
DECLARATION
[Pure]
public HashMap<K, V> Remove(K key)
RETURNS
HashMap<K, V>
New map with the item removed
RemoveRange(IEnumerable<K>)
SUMMARY

Atomically removes a set of keys from the map

PARAMETERS
keys
IEnumerable<K>
Keys to remove
DECLARATION
[Pure]
public HashMap<K, V> RemoveRange(IEnumerable<K> keys)
RETURNS
HashMap<K, V>
New map with the items removed
Select<U>(Func<V, U>)
SUMMARY

Atomically maps the map to a new map

PARAMETERS
mapper
Func<V, U>
DECLARATION
[Pure]
public HashMap<K, U> Select<U>(Func<V, U> mapper)
RETURNS
HashMap<K, U>
Mapped items in a new map
Select<U>(Func<K, V, U>)
SUMMARY

Atomically maps the map to a new map

PARAMETERS
mapper
Func<K, V, U>
DECLARATION
[Pure]
public HashMap<K, U> Select<U>(Func<K, V, U> mapper)
RETURNS
HashMap<K, U>
Mapped items in a new map
SetItem(K, V)
SUMMARY

Atomically updates an existing item

PARAMETERS
key
K
Key
value
V
Value
REMARKS
Null is not allowed for a Key or a Value
DECLARATION
[Pure]
public HashMap<K, V> SetItem(K key, V value)
RETURNS
HashMap<K, V>
New Map with the item added
EXCEPTIONS
ArgumentNullException
Throws ArgumentNullException the key or value are null
SetItem(K, Func<V, V>)
SUMMARY

Retrieve a value from the map by key, map it to a new value, put it back.

PARAMETERS
key
K
Key to set
Some
Func<V, V>
DECLARATION
[Pure]
public HashMap<K, V> SetItem(K key, Func<V, V> Some)
RETURNS
HashMap<K, V>
New map with the mapped value
EXCEPTIONS
ArgumentException
Throws ArgumentException if the item isn't found
Exception
Throws Exception if Some returns null
SetItems(IEnumerable<KeyValuePair<K, V>>)
SUMMARY

Atomically sets a series of items using the KeyValuePairs provided

PARAMETERS
items
IEnumerable<KeyValuePair<K, V>>
Items to set
DECLARATION
[Pure]
public HashMap<K, V> SetItems(IEnumerable<KeyValuePair<K, V>> items)
RETURNS
HashMap<K, V>
New map with the items set
EXCEPTIONS
ArgumentException
Throws ArgumentException if any of the keys aren't in the map
SetItems(IEnumerable<Tuple<K, V>>)
SUMMARY

Atomically sets a series of items using the Tuples provided.

PARAMETERS
items
IEnumerable<Tuple<K, V>>
Items to set
DECLARATION
[Pure]
public HashMap<K, V> SetItems(IEnumerable<Tuple<K, V>> items)
RETURNS
HashMap<K, V>
New map with the items set
EXCEPTIONS
ArgumentException
Throws ArgumentException if any of the keys aren't in the map
SetItems(IEnumerable<ValueTuple<K, V>>)
SUMMARY

Atomically sets a series of items using the Tuples provided.

PARAMETERS
items
IEnumerable<ValueTuple<K, V>>
Items to set
DECLARATION
[Pure]
public HashMap<K, V> SetItems(IEnumerable<ValueTuple<K, V>> items)
RETURNS
HashMap<K, V>
New map with the items set
EXCEPTIONS
ArgumentException
Throws ArgumentException if any of the keys aren't in the map
Subtract(HashMap<K, V>)
PARAMETERS
rhs
HashMap<K, V>
DECLARATION
[Pure]
public HashMap<K, V> Subtract(HashMap<K, V> rhs)
RETURNS
HashMap<K, V>
ToDictionary()
SUMMARY

Convert the map to an IDictionary

DECLARATION
[Pure]
public IReadOnlyDictionary<K, V> ToDictionary()
RETURNS
IReadOnlyDictionary<K, V>
ToDictionary<KR, VR>(Func<ValueTuple<K, V>, KR>, Func<ValueTuple<K, V>, VR>)
SUMMARY

Map the map the a dictionary

PARAMETERS
keySelector
Func<ValueTuple<K, V>, KR>
valueSelector
Func<ValueTuple<K, V>, VR>
DECLARATION
[Pure]
public IDictionary<KR, VR> ToDictionary<KR, VR>(Func<ValueTuple<K, V>, KR> keySelector, Func<ValueTuple<K, V>, VR> valueSelector)
RETURNS
IDictionary<KR, VR>
ToReadOnlyDictionary()
SUMMARY

Get a IReadOnlyDictionary for this map. No mapping is required, so this is very fast.

DECLARATION
[Pure]
public IReadOnlyDictionary<K, V> ToReadOnlyDictionary()
RETURNS
IReadOnlyDictionary<K, V>
ToSeq()
DECLARATION
[Pure]
public Seq<ValueTuple<K, V>> ToSeq()
RETURNS
Seq<ValueTuple<K, V>>
TryAdd(K, V)
SUMMARY

Atomically adds a new item to the map. If the key already exists, then the new item is ignored

PARAMETERS
key
K
Key
value
V
Value
REMARKS
Null is not allowed for a Key or a Value
DECLARATION
[Pure]
public HashMap<K, V> TryAdd(K key, V value)
RETURNS
HashMap<K, V>
New Map with the item added
EXCEPTIONS
ArgumentNullException
Throws ArgumentNullException the key or value are null
TryAddRange(IEnumerable<Tuple<K, V>>)
SUMMARY

Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.

PARAMETERS
range
IEnumerable<Tuple<K, V>>
Range of tuples to add
REMARKS
Null is not allowed for a Key or a Value
DECLARATION
[Pure]
public HashMap<K, V> TryAddRange(IEnumerable<Tuple<K, V>> range)
RETURNS
HashMap<K, V>
New Map with the items added
EXCEPTIONS
ArgumentNullException
Throws ArgumentNullException the keys or values are null
TryAddRange(IEnumerable<ValueTuple<K, V>>)
SUMMARY

Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.

PARAMETERS
range
IEnumerable<ValueTuple<K, V>>
Range of tuples to add
REMARKS
Null is not allowed for a Key or a Value
DECLARATION
[Pure]
public HashMap<K, V> TryAddRange(IEnumerable<ValueTuple<K, V>> range)
RETURNS
HashMap<K, V>
New Map with the items added
EXCEPTIONS
ArgumentNullException
Throws ArgumentNullException the keys or values are null
TryAddRange(IEnumerable<KeyValuePair<K, V>>)
SUMMARY

Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.

PARAMETERS
range
IEnumerable<KeyValuePair<K, V>>
Range of KeyValuePairs to add
REMARKS
Null is not allowed for a Key or a Value
DECLARATION
[Pure]
public HashMap<K, V> TryAddRange(IEnumerable<KeyValuePair<K, V>> range)
RETURNS
HashMap<K, V>
New Map with the items added
EXCEPTIONS
ArgumentNullException
Throws ArgumentNullException the keys or values are null
TrySetItem(K, V)
SUMMARY

Atomically updates an existing item, unless it doesn't exist, in which case it is ignored

PARAMETERS
key
K
Key
value
V
Value
REMARKS
Null is not allowed for a Key or a Value
DECLARATION
[Pure]
public HashMap<K, V> TrySetItem(K key, V value)
RETURNS
HashMap<K, V>
New Map with the item added
EXCEPTIONS
ArgumentNullException
Throws ArgumentNullException the value is null
TrySetItem(K, Func<V, V>)
SUMMARY

Atomically sets an item by first retrieving it, applying a map, and then putting it back. Silently fails if the value doesn't exist

PARAMETERS
key
K
Key to set
Some
Func<V, V>
delegate to map the existing value to a new one before setting
DECLARATION
[Pure]
public HashMap<K, V> TrySetItem(K key, Func<V, V> Some)
RETURNS
HashMap<K, V>
New map with the item set
EXCEPTIONS
Exception
Throws Exception if Some returns null
ArgumentNullException
Throws ArgumentNullException the key or value are null
TrySetItems(IEnumerable<KeyValuePair<K, V>>)
SUMMARY

Atomically sets a series of items using the KeyValuePairs provided. If any of the items don't exist then they're silently ignored.

PARAMETERS
items
IEnumerable<KeyValuePair<K, V>>
Items to set
DECLARATION
[Pure]
public HashMap<K, V> TrySetItems(IEnumerable<KeyValuePair<K, V>> items)
RETURNS
HashMap<K, V>
New map with the items set
TrySetItems(IEnumerable<Tuple<K, V>>)
SUMMARY

Atomically sets a series of items using the Tuples provided If any of the items don't exist then they're silently ignored.

PARAMETERS
items
IEnumerable<Tuple<K, V>>
Items to set
DECLARATION
[Pure]
public HashMap<K, V> TrySetItems(IEnumerable<Tuple<K, V>> items)
RETURNS
HashMap<K, V>
New map with the items set
TrySetItems(IEnumerable<ValueTuple<K, V>>)
SUMMARY

Atomically sets a series of items using the Tuples provided If any of the items don't exist then they're silently ignored.

PARAMETERS
items
IEnumerable<ValueTuple<K, V>>
Items to set
DECLARATION
[Pure]
public HashMap<K, V> TrySetItems(IEnumerable<ValueTuple<K, V>> items)
RETURNS
HashMap<K, V>
New map with the items set
TrySetItems(IEnumerable<K>, Func<V, V>)
SUMMARY

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.

PARAMETERS
keys
IEnumerable<K>
Keys of items to set
Some
Func<V, V>
Function map the existing item to a new one
DECLARATION
[Pure]
public HashMap<K, V> TrySetItems(IEnumerable<K> keys, Func<V, V> Some)
RETURNS
HashMap<K, V>
New map with the items set
Where(Func<V, bool>)
SUMMARY

Atomically filter out items that return false when a predicate is applied

PARAMETERS
pred
Func<V, bool>
Predicate
DECLARATION
[Pure]
[EditorBrowsable(EditorBrowsableState.Never)]
public HashMap<K, V> Where(Func<V, bool> pred)
RETURNS
HashMap<K, V>
New map with items filtered
Where(Func<K, V, bool>)
SUMMARY

Atomically filter out items that return false when a predicate is applied

PARAMETERS
pred
Func<K, V, bool>
Predicate
DECLARATION
[Pure]
[EditorBrowsable(EditorBrowsableState.Never)]
public HashMap<K, V> Where(Func<K, V, bool> pred)
RETURNS
HashMap<K, V>
New map with items filtered