BoundedDict<'TKey, 'TValue> Type
Bounded dictionary — auto-evicts the first-inserted key when capacity is reached. Not thread-safe.
Constructors
| Constructor |
Description
|
|
|
Instance members
| Instance member |
Description
|
Full Usage:
this.Clear
|
Clears all items. |
Full Usage:
this.ContainsKey
Parameters:
'TKey
Returns: bool
|
Returns true if the key exists. The key to check for.
|
Full Usage:
this.Count
Returns: int
|
Number of items.
|
Full Usage:
this[key]
Parameters:
'TKey
Returns: 'TValue
|
Gets a value by key, throws if not found. The key to retrieve.
|
Full Usage:
this.Remove
Parameters:
'TKey
Returns: bool
|
Removes a key. Returns true if removed. The key to remove.
|
Full Usage:
this.Set
Parameters:
'TKey
value : 'TValue
|
Adds or updates a key. Evicts the oldest if at capacity. The key to add or update. The value to associate with the key.
|
Full Usage:
this.TryGet
Parameters:
'TKey
Returns: 'TValue option
|
Tries to get a value by key. The key to look up.
|
TDesu.FSharp