private void SetHeadItem(T data)
 {
     Head          = new TwoWayItem <T>(data);
     Head.Next     = Head;
     Head.Previous = Head;
     Count         = 1;
 }
        public DoubleLinkedList(T data)
        {
            var item = new TwoWayItem <T>(data);

            Head  = item;
            Tail  = item;
            Count = 1;
        }
        public void Add(T data)
        {
            if (Count == 0)
            {
                SetHeadItem(data);
                return;
            }
            var item = new TwoWayItem <T>(data);

            item.Next          = Head;
            item.Previous      = Head.Previous;
            Head.Previous.Next = item;
            Head.Previous      = item;
            Count++;
        }
        public void Add(T data)
        {
            var item = new TwoWayItem <T>(data);

            if (Count == 0)
            {
                Head  = item;
                Tail  = item;
                Count = 1;
                return;
            }

            Tail.Next     = item;
            item.Previous = Tail;
            Tail          = item;
            Count++;
        }
 private void RemoveItem(TwoWayItem <T> current)
 {
     current.Next.Previous = current.Previous;
     current.Previous.Next = current.Next;
     Count--;
 }