17 lines
No EOL
722 B
C#
17 lines
No EOL
722 B
C#
using System.Collections.Generic;
|
|
|
|
namespace JD.Collections.Details
|
|
{
|
|
/// <summary>
|
|
/// Hashes takes less memory when smaller than uint.MaxValue. To use the optimization, VariableSizeHash switches it's implementation when
|
|
/// reaching uint.MaxValue items.
|
|
/// </summary>
|
|
/// <typeparam name="T"></typeparam>
|
|
/// <remarks>using REF : The concept is to swap the hash when reaching the limit of short hash</remarks>
|
|
public interface IVariableSizeHash<T> : IHashBase<T>
|
|
{
|
|
bool Add(T value, CollisionBehavior collisionBehavior, ref IVariableSizeHash<T> newHash);
|
|
void AddRange(IEnumerable<T> value, ref IVariableSizeHash<T> newHash);
|
|
IVariableSizeHash<T> Clone();
|
|
}
|
|
} |