Exemplo n.º 1
0
        /// <summary>
        ///     Appends a pooled node with with specified value to the end of the list.
        /// </summary>
        public void Append(T value)
        {
            var node = Linked <T> .Borrow(value);

            if (head == null)
            {
                head = node;
            }
            else
            {
                tail.next = node;
            }
            tail = node;
            ++count;
        }
Exemplo n.º 2
0
 /// <summary>
 ///     Returns a list containing a single node with the specified value.
 /// </summary>
 public LinkedHeadTail(T value) : this(Linked <T> .Borrow(value))
 {
 }