M42.Collections by Daniel Pelsmaeker

<PackageReference Include="M42.Collections" Version="0.6.5056.5071" />

 HashMap<TKey, TValue>

public class HashMap<TKey, TValue> : IMutableKeyedCollection<TKey, TValue>, IKeyedCollection<TKey, TValue>, IMutableCollection<IAssociation<TKey, TValue>>, ICollection<IAssociation<TKey, TValue>>, IEnumerable<IAssociation<TKey, TValue>>, ICollection, IEnumerable
A hash map.
public int Count { get; }

public bool IsEmpty { get; }

public bool IsFrozen { get; }

public TValue this[TKey key] { get; set; }

public IEqualityComparer<TKey> KeyComparer { get; }

Gets the comparer used to compare the keys in this hash map.

public ICollection<TKey> Keys { get; }

public IEqualityComparer<TValue> ValueComparer { get; }

Gets the comparer used to compare the values in this hash map.

public ICollection<TValue> Values { get; }

public HashMap()

Initializes a new instance of the HashMap<T, U> class.

public HashMap(IEqualityComparer<TKey> keyComparer)

Initializes a new instance of the HashMap<T, U> class.

public HashMap(IEqualityComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer)

Initializes a new instance of the HashMap<T, U> class.

public HashMap(IEnumerable<IAssociation<TKey, TValue>> elements)

Initializes a new instance of the HashMap<T, U> class.

public HashMap(IEnumerable<IAssociation<TKey, TValue>> elements, IEqualityComparer<TKey> keyComparer)

Initializes a new instance of the HashMap<T, U> class.

public HashMap(IEnumerable<IAssociation<TKey, TValue>> elements, IEqualityComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer)

Initializes a new instance of the HashMap<T, U> class.

public bool Add(TKey key, TValue value)

public void Clear()

public bool ContainsKey(object key)

public IEnumerator<Association<TKey, TValue>> GetEnumerator()

Returns an enumerator that iterates through the collection.

public TValue GetValue(object key)

public virtual bool IsValidKey(object key)

public virtual bool IsValidValue(object value)

public bool RemoveKey(object key)

public bool TryGetValue(object key, out TValue value)

Attempts to get a value from the HashMap<T, U>.