M42.Collections by Daniel Pelsmaeker

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

 BiHashMap<TKey, TValue>

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

public BiHashMap<TValue, TKey> Inverse { get; }

Gets the inverse hash map.

public bool IsEmpty { get; }

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

public ICollection<TKey> Keys { get; }

public ICollection<TValue> Values { get; }

public BiHashMap()

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

public bool Add(TKey key, TValue value)

public void Clear()

public bool ContainsKey(TKey key)

Returns whether the map contains one or more elements with a key that is considered to be equal to the specified key.

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

Returns an enumerator that iterates through the collection.

public virtual bool IsValidKey(object key)

public virtual bool IsValidValue(object value)

public bool RemoveKey(TKey key)

public bool TryGetValue(TKey key, out TValue value)

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