/// <summary>
 /// Adds id and value to sort.
 /// </summary>
 /// <param name="id">Id of the delta alignment.</param>
 /// <param name="value">Value to sort.</param>
 public void Add(long id, long value)
 {
     Node node = new Node();
     node.ID = id;
     node.Value = value;
     this.Add(node);
 }
        /// <summary>
        /// Adds a node.
        /// </summary>
        /// <param name="node">Node to add.</param>
        public void Add(Node node)
        {
            if (node == null)
            {
                throw new ArgumentNullException("node");
            }

            Holder holder = this.GetHolderFor(node.Value);

            // add the node to the holder.
            if (holder.ValueNode == null)
            {
                holder.ValueNode = node;
            }
            else
            {
                Node previousNode = holder.ValueNode;
                while (previousNode.Next != null)
                {
                    previousNode = previousNode.Next;
                }

                previousNode.Next = node;
            }

            this.Count++;
        }