Exemple #1
0
 private void pop_front()
 {
     if (!this.empty())
     {
         this.first = this.first.next;
         length--;
     }
 }
Exemple #2
0
 private void pop_back()
 {
     if (!this.empty())
     {
         this.last      = this.last.prev;
         this.last.next = null;
         length--;
     }
 }
Exemple #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);
     }
 }
Exemple #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++;
            }
        }
Exemple #5
0
 public void Reset()
 {
     current = pocz;
 }
Exemple #6
0
 public bool MoveNext()
 {
     current = current.next;
     return(current != null);
 }
Exemple #7
0
 public ListEnum(wezel <T> W)
 {
     this.pocz      = new wezel <T>(default(T));
     this.pocz.next = W;
     this.current   = this.pocz;
 }