Interface ISymbolTable<TKey, TValue>
- Namespace
- AlgorithmsSW.SymbolTable
- Assembly
- AlgorithmsSW.dll
Defines methods for managing a generic symbol table.
public interface ISymbolTable<TKey, TValue> : IReadOnlySymbolTable<TKey, TValue>
Type Parameters
TKey
The type of keys in the symbol table.
TValue
The type of values in the symbol table.
- Inherited Members
- Extension Methods
Properties
this[TKey]
Gets and sets the value associated with the given key.
TValue this[TKey key] { get; set; }
Parameters
key
TKeyThe key whose value to get.
Property Value
- TValue
Exceptions
- KeyNotFoundException
the key is not present in the symbol table.
Methods
Add(TKey, TValue)
Adds the specified key and value to the symbol table.
void Add(TKey key, TValue value)
Parameters
key
TKeyThe key of the element to add.
value
TValueThe value of the element to add.
Clear()
Removes all keys and values from the symbol table.
void Clear()
RemoveKey(TKey)
Removes the element with the specified key from the symbol table.
void RemoveKey(TKey key)
Parameters
key
TKeyThe key of the element to remove.