initialPrefabs logo
  • Home 
  • Blog 
  • Tools 
  • Tags 
  1. Home
  2. Tools
  3. No Alloc Collections Documentation
  4. NoAllocHashMap

NoAllocHashMap

1 min read • 134 words
Tools   API  
Tools   API  
Share via
initialPrefabs
Link copied to clipboard

On this page
  • namespace InitialPrefabs.Collections
  • Summary
  • TypeParam
  • TypeParam
  • bool TryAdd(K key, V item)
    • Summary
    • Param
    • Returns
  • bool TryGetValue(K key, out V value)
    • Summary
    • Param
    • Returns
  • void Clear()
    • Summary

NoAllocHashMap  

namespace InitialPrefabs.Collections  

Summary  

A stack only dictionary that stores a key value pair.

TypeParam  

Any type implementing IEquatable{T}

TypeParam  

Any type

bool TryAdd(K key, V item)  

Summary  

Attempts to add a value given a key if it does not exist.

Param  

Parameter Description
key A unique identifier
item The value to associate with the key

Returns  

bool - True, if successfully added

bool TryGetValue(K key, out V value)  

Summary  

Attempts to get a value given a key.

Param  

Parameter Description
key The unique id to look for
value The value stored in the hash map

Returns  

bool - True, if successfully retrieved, otherwise false

void Clear()  

Summary  

Removes all elements in the hashmap.

Go back to API Home

 NoAllocEnumerator
NoAllocHashSet 
On this page:
  • namespace InitialPrefabs.Collections
  • Summary
  • TypeParam
  • TypeParam
  • bool TryAdd(K key, V item)
    • Summary
    • Param
    • Returns
  • bool TryGetValue(K key, out V value)
    • Summary
    • Param
    • Returns
  • void Clear()
    • Summary
Follow Us!

Contact us if you want to work with us for your games and art projects!

     
Copyright © 2016-2025 InitialPrefabs
initialPrefabs
Code copied to clipboard