Class DoubleKeyDictionary<K, T, V>
- Namespace
- HelixToolkit
- Assembly
- HelixToolkit.dll
A double key dictionary.
public class DoubleKeyDictionary<K, T, V> : IEnumerable<DoubleKeyPairValue<K, T, V>>, IEnumerable, IEquatable<DoubleKeyDictionary<K, T, V>> where K : notnull where T : notnull
Type Parameters
KThe first key type.
TThe second key type.
VThe value type.
- Inheritance
-
DoubleKeyDictionary<K, T, V>
- Implements
-
IEnumerable<DoubleKeyPairValue<K, T, V>>IEquatable<DoubleKeyDictionary<K, T, V>>
- Inherited Members
- Extension Methods
Remarks
See http://noocyte.wordpress.com/2008/02/18/double-key-dictionary/ A Remove method was added.
Properties
this[K, T]
Gets or sets the value with the specified indices.
public V this[K index1, T index2] { get; set; }
Parameters
index1Kindex2T
Property Value
- V
Values
Gets the values.
public IEnumerable<V> Values { get; }
Property Value
- IEnumerable<V>
The values.
Methods
Add(K, T, V)
Adds the specified key.
public void Add(K key1, T key2, V value)
Parameters
key1KThe key1.
key2TThe key2.
valueVThe value.
Clear()
Clears this dictionary.
public void Clear()
ContainsKey(K, T)
Determines whether the specified dictionary contains the key.
public bool ContainsKey(K index1, T index2)
Parameters
index1KThe index1.
index2TThe index2.
Returns
- bool
trueif the specified index1 contains key; otherwise,false.
Equals(DoubleKeyDictionary<K, T, V>?)
Equalses the specified other.
public bool Equals(DoubleKeyDictionary<K, T, V>? other)
Parameters
otherDoubleKeyDictionary<K, T, V>The other.
Returns
- bool
The equals.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetEnumerator()
Gets the enumerator.
public IEnumerator<DoubleKeyPairValue<K, T, V>> GetEnumerator()
Returns
- IEnumerator<DoubleKeyPairValue<K, T, V>>
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Remove(K, T)
Removes the specified key.
public void Remove(K key1, T key2)
Parameters
key1KThe key1.
key2TThe key2.
TryGetValue(K, T, out V)
public bool TryGetValue(K key1, T key2, out V obj)
Parameters
key1Kkey2TobjV