NativeParallelMultiHashMap<TKey, TValue>
An unordered, expandable associative array. Each key can have more than one associated value.
Read time 2 minutesLast updated 12 days ago
Definition
public struct NativeParallelMultiHashMap<TKey, TValue> : INativeDisposable, IDisposable, IEnumerable<KeyValue<TKey, TValue>>, IEnumerable where TKey : unmanaged, IEquatable<TKey> where TValue : unmanaged
Unlike a regular NativeParallelHashMap, a NativeParallelMultiHashMap can store multiple key-value pairs with the same key.
The keys are not deduplicated: two key-value pairs with the same key are stored as fully separate key-value pairs.
Static Fields
Value | Description |
|---|
| MaxCapacity | The maximum number of elements this type of container can hold. |
Constructors
Properties
Property | Description |
|---|
| Capacity | Returns the number of key-value pairs that fit in the current allocation. |
| IsCreated | Whether this hash map has been allocated (and not yet deallocated). |
| IsEmpty | Whether this hash map is empty. |
Methods
Method | Description |
|---|
| Add | Adds a new key-value pair. |
| AsParallelWriter | Returns a parallel writer for this hash map. |
| AsReadOnly | Returns a readonly version of this NativeParallelHashMap instance. |
| Clear | Removes all key-value pairs. |
| ContainsKey | Returns true if a given key is present in this hash map. |
| Count | Returns the current number of key-value pairs in this hash map. |
| CountValuesForKey | Returns the number of values associated with a given key. |
| Dispose | Releases all resources (memory and safety handles). |
| GetEnumerator | Returns an enumerator over the key-value pairs of this hash map. |
| GetKeyArray | Returns an array with a copy of all the keys (in no particular order). |
| GetKeyValueArrays | Returns a NativeKeyValueArrays with a copy of all the keys and values (in no particular order). |
| GetValueArray | Returns an array with a copy of all the values (in no particular order). |
| GetValuesForKey | Returns an enumerator over the values of an individual key. |
| Remove | Removes a key and its associated value(s). |
| SetValue | Sets a new value for an existing key-value pair. |
| TryGetFirstValue | Gets an iterator for a key. |
| TryGetNextValue | Advances an iterator to the next value associated with its key. |
Structs