Ejemplo n.º 1
0
        public void Append(T value)
        {
            if (Head == null)
            {
                Head = new WindowElement <T> {
                    Value = value, Next = null
                };
                Tail = Head;
                Length++;
                return;
            }

            Head.Next = new WindowElement <T> {
                Value = value, Next = null
            };
            Head = Head.Next;
            if (Length < capacity)
            {
                Length++;
                return;
            }

            Tail = Tail.Next;
        }
Ejemplo n.º 2
0
 public bool MoveNext()
 {
     currentElement = currentElement == null ? window.Tail : currentElement.Next;
     return(currentElement != null);
 }
Ejemplo n.º 3
0
 public WindowElementEnumerator(WindowValues <T> window)
 {
     this.window    = window;
     currentElement = null;
 }