Interface IReadOnlyTwoWayDictionary<T1, T2>
- Namespace
- LfrlAnvil.Collections
- Assembly
- LfrlAnvil.Collections.dll
Represents a generic read-only collection of two-way (forward, reverse) pairs.
public interface IReadOnlyTwoWayDictionary<T1, T2> : IReadOnlyCollection<Pair<T1, T2>>, IEnumerable<Pair<T1, T2>>, IEnumerable where T1 : notnull where T2 : notnull
Type Parameters
T1
First value type.
T2
Second value type.
- Inherited Members
- Extension Methods
Properties
Forward
Represents the T1
=> T2
read-only dictionary.
IReadOnlyDictionary<T1, T2> Forward { get; }
Property Value
- IReadOnlyDictionary<T1, T2>
ForwardComparer
Forward key equality comparer.
IEqualityComparer<T1> ForwardComparer { get; }
Property Value
Reverse
Represents the T2
=> T1
read-only dictionary.
IReadOnlyDictionary<T2, T1> Reverse { get; }
Property Value
- IReadOnlyDictionary<T2, T1>
ReverseComparer
Reverse key equality comparer.
IEqualityComparer<T2> ReverseComparer { get; }
Property Value
Methods
Contains(T1, T2)
Checks whether or not the provided pair exists.
[Pure]
bool Contains(T1 first, T2 second)
Parameters
first
T1First value.
second
T2Second value.
Returns
- bool
true when pair exists, otherwise false.