protected (HashNode <T> previous, HashNode <T> current) GetNodeByKey(string key)
        {
            int          position = GetBucketByKey(key);
            HashNode <T> listNode = buckets[position];
            HashNode <T> previous = null;

            while (null != listNode)
            {
                if (listNode.Key == key)
                {
                    return(previous, listNode);
                }
                previous = listNode;
                listNode = listNode.Next;
            }
            return(null, null);
        }
        public void Add(string key, T item)
        {
            ValidateKey(key);

            var valueNode = new HashNode <T> {
                Key = key, Value = item, Next = null
            };
            int position = GetBucketByKey(key);

            listNode = buckets[position];

            if (null == listNode)
            {
                buckets[position] = valueNode;
            }
            else
            {
                while (null != listNode.Next)
                {
                    listNode = listNode.Next;
                }
                listNode.Next = valueNode;
            }
        }