HashTable<T>

public class HashTable<T>
Provides a simple hash table.
TType of data to store.

Properties

Count

#
Gets the number of items stored in this hash table.
public int Count { get; }

Methods

Add

#
Adds a value to the table. If a similar hash already exists, the table remains unchanged.
public bool Add(
hash,
Hash of item.
T
data
Item.
)
True if the item was added, false if the hash collided.

Clear

#
Clear the table. This methods also resets the byte-depth constraint.
public void Clear()

Contains

#
Tests whether a certain hash has been stored in this table.
public bool Contains(
hash
Hash to test for.
)
True if the table contains the given hash.

Overwrite

#
Adds a value to the table. If a similar hash already exists, the old value is overwritten.
public void Overwrite(
hash,
Hash of item.
T
data
Item.
)

Remove

#
Removes an item from this table.
public bool Remove(
hash
Hash to remove.
)
True if the item with the associated hash was removed.

TryGetValue

#
Gets the value associated with the specified hash.
public bool TryGetValue(
hash,
Hash to search for.
out T
value
Value to retrieve.
)
True on success, false on failure.