Пример #1
0
 private void pop_front()
 {
     if (!this.empty())
     {
         this.first = this.first.next;
         length--;
     }
 }
Пример #2
0
 private void pop_back()
 {
     if (!this.empty())
     {
         this.last      = this.last.prev;
         this.last.next = null;
         length--;
     }
 }
Пример #3
0
 public T this[int indeks] {
     get {
         wezel <T> W = this.first;
         for (int i = 0; i < indeks; i++)
         {
             W = W.next;
         }
         return(W.val);
     }
 }
Пример #4
0
        private void push_front(T x)
        {
            wezel <T> w = new wezel <T> (x);

            if (this.empty())
            {
                this.first = w;
                this.last  = w;
                this.length++;
            }
            else
            {
                w.next          = this.first;
                this.first.prev = w;
                this.first      = w;
                this.length++;
            }
        }
Пример #5
0
 public void Reset()
 {
     current = pocz;
 }
Пример #6
0
 public bool MoveNext()
 {
     current = current.next;
     return(current != null);
 }
Пример #7
0
 public ListEnum(wezel <T> W)
 {
     this.pocz      = new wezel <T>(default(T));
     this.pocz.next = W;
     this.current   = this.pocz;
 }