Class RedBlackTreeExtensions
Inheritance
RedBlackTreeExtensions
Assembly: Solti.Utils.Primitives.dll
Syntax
public static class RedBlackTreeExtensions : Object
Methods
Clone<TData>(RedBlackTree<TData>)
Declaration
public static RedBlackTree<TData> Clone<TData>(this RedBlackTree<TData> src)
Parameters
Returns
Type Parameters
CreateLookup<TKey, TValue>()
Creates a red-black tree intended for value lookup.
Declaration
public static RedBlackTree<KeyValuePair<TKey, TValue>> CreateLookup<TKey, TValue>()
where TKey : IComparable<TKey>
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
TryAdd<TKey, TValue>(RedBlackTree<KeyValuePair<TKey, TValue>>, TKey, TValue)
Tries to add a value to the lookup.
Declaration
public static bool TryAdd<TKey, TValue>(this RedBlackTree<KeyValuePair<TKey, TValue>> src, TKey key, TValue value)
where TKey : IComparable<TKey>
Parameters
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
TryGet<TKey, TValue>(RedBlackTree<KeyValuePair<TKey, TValue>>, TKey, out TValue)
Tries to get a value associated with the given key.
Declaration
public static bool TryGet<TKey, TValue>(this RedBlackTree<KeyValuePair<TKey, TValue>> src, TKey key, out TValue result)
where TKey : IComparable<TKey>
Parameters
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|