Struct Map<TLeft, TRight>.AlternateLookup<TAlternateLeft, TAlternateRight>
Provides an alternate lookup that can be used to perform operations on a Map<TLeft, TRight> using TAlternateLeft
instead of TLeft
and TAlternateRight
instead of TRight
.
Namespace: Singulink.Collections
Assembly: Singulink.Collections.dll
Syntax
public readonly struct Map<TLeft, TRight>.AlternateLookup<TAlternateLeft, TAlternateRight> where TAlternateLeft : notnull, allows ref struct where TAlternateRight : notnull, allows ref struct
Type Parameters
Name | Description |
---|---|
TAlternateLeft | |
TAlternateRight |
Properties
Name | Description |
---|---|
this[TAlternateLeft] | Gets or sets the right value associated with the specified alternate left value. |
LeftComparer | Gets the alternate equality comparer used for left values. |
Map | Gets the underlying map associated with this alternate lookup. |
Reverse | Gets the reverse alternate lookup where the left and right side are flipped. |
RightComparer | Gets the alternate equality comparer used for right values. |
Methods
Name | Description |
---|---|
Contains(TAlternateLeft, TAlternateRight) | Gets a value indicating if the map contains an association between the specified alternate left and alternate right value. |
Contains(TAlternateLeft, TAlternateRight, out TLeft, out TRight) | Gets a value indicating if the map contains an association between the specified alternate left and alternate right value. |
ContainsLeft(TAlternateLeft) | Determines whether the map contains the specified alternate left value. |
ContainsLeft(TAlternateLeft, out TLeft) | Determines whether the map contains the specified alternate left value. |
ContainsRight(TAlternateRight) | Determines whether the map contains the specified alternate right value. |
ContainsRight(TAlternateRight, out TRight) | Determines whether the map contains the specified alternate right value. |
Remove(TAlternateLeft, TAlternateRight) | Removes an association from the map between the specified alternate left and alternate right value if they currently map to each other. |
Remove(TAlternateLeft, TAlternateRight, out TLeft, out TRight) | Removes an association from the map between the specified alternate left and alternate right value if they currently map to each other. |
RemoveLeft(TAlternateLeft) | Removes the mapping with the specified alternate left value. |
RemoveLeft(TAlternateLeft, out TLeft, out TRight) | Removes the mapping with the specified alternate left value. |
RemoveRight(TAlternateRight) | Removes the mapping with the specified alternate right value. |
RemoveRight(TAlternateRight, out TRight, out TLeft) | Removes the mapping with the specified alternate right value. |
Set(TLeft, TAlternateRight) | Sets an association in the map between the specified left value and alternate right value, overriding any existing associations these values had. |
Set(TLeft, TAlternateRight, out TRight) | Sets an association in the map between the specified left value and alternate right value, overriding any existing associations these values had. |
Set(TAlternateLeft, TRight) | Sets an association in the map between the specified alternate left value and right value, overriding any existing associations these values had. |
Set(TAlternateLeft, TRight, out TLeft) | Sets an association in the map between the specified alternate left value and right value, overriding any existing associations these values had. |
Set(TAlternateLeft, TAlternateRight) | Sets an association in the map between the specified alternate left and alternate right value, overriding any existing associations these values had. |
Set(TAlternateLeft, TAlternateRight, out TLeft, out TRight) | Sets an association in the map between the specified alternate left and alternate right value, overriding any existing associations these values had. |
TryAdd(TLeft, TAlternateRight) | Attempts to add an association to map between the specified left value and alternate right value. |
TryAdd(TLeft, TAlternateRight, out TRight) | Attempts to add an association to map between the specified left value and alternate right value. |
TryAdd(TAlternateLeft, TRight) | Attempts to add an association to map between the specified alternate left value and right value. |
TryAdd(TAlternateLeft, TRight, out TLeft) | Attempts to add an association to map between the specified alternate left value and right value. |
TryAdd(TAlternateLeft, TAlternateRight) | Attempts to add an association to map between the specified alternate left value and alternate right value. |
TryAdd(TAlternateLeft, TAlternateRight, out TLeft, out TRight) | Attempts to add an association to map between the specified alternate left value and alternate right value. |
TryGetLeftValue(TAlternateRight, out TLeft) | Gets the left value associated with the specified alternate right value. |
TryGetLeftValue(TAlternateRight, out TRight, out TLeft) | Gets the left value associated with the specified alternate right value. |
TryGetRightValue(TAlternateLeft, out TLeft, out TRight) | Gets the right value associated with the specified alternate left value. |
TryGetRightValue(TAlternateLeft, out TRight) | Gets the right value associated with the specified alternate left value. |