Esempio n. 1
0
 public List()
 {
     head = new ListElement();
     head.SetNum(0);
     head.SetNext(null);
     length = 0;
 }
Esempio n. 2
0
 public List()
 {
     head = new ListElement();
     head.num = 0;
     head.next = null;
     length = 0;
 }
Esempio n. 3
0
 public void Insert(int value, ListElement pos)
 {
     ListElement temp = new ListElement();
     temp.num = value;
     temp.next = pos.next;
     pos.next = temp;
     ++length;
 }
Esempio n. 4
0
 public virtual void Insert(int value, ListElement pos)
 {
     ListElement temp = new ListElement();
     temp.SetNum(value);
     temp.SetNext(pos.GetNext());
     pos.SetNext(temp);
     ++length;
 }
Esempio n. 5
0
 public void Remove(ListElement pos)
 {
     ListElement temp = this.head;
     if (this.head.next == null)
         return;
     while (temp.next == null || temp.next != pos)
     {
         temp = temp.next;
     }
     temp.next = pos.next;
     --length;
 }
Esempio n. 6
0
 public void Remove(ListElement pos)
 {
     ListElement temp = this.head;
     if (this.head.GetNext() == null)
         return;
     while (temp.GetNext() == null || temp.GetNext() != pos)
     {
         temp = temp.GetNext();
     }
     temp.SetNext(pos.GetNext());
     --length;
 }
Esempio n. 7
0
 public int Retrieve(ListElement pos)
 {
     return pos.num;
 }
Esempio n. 8
0
 public ListElement Next(ListElement pos)
 {
     return pos.next;
 }
Esempio n. 9
0
 public ListElement Next(ListElement pos)
 {
     return pos.GetNext();
 }
Esempio n. 10
0
 public int Retrieve(ListElement pos)
 {
     return pos.GetNum();
 }
Esempio n. 11
0
 public ListElement Next(ListElement pos)
 {
     return(pos.next);
 }
Esempio n. 12
0
 public int Retrieve(ListElement pos)
 {
     return(pos.num);
 }
Esempio n. 13
0
 public ListElement Next(ListElement pos)
 {
     return(pos.GetNext());
 }
Esempio n. 14
0
 public int Retrieve(ListElement pos)
 {
     return(pos.GetNum());
 }
Esempio n. 15
0
 public void SetNext(ListElement value)
 {
     this.next = value;
 }