Ejemplo n.º 1
0
 private void DetachElement(ListElement element)
 {
     element.OwnerList       = null;
     element.PreviousElement = null;
     element.NextElement     = null;
 }
Ejemplo n.º 2
0
 // Creates a shallow copy of toCopy.
 public LinkedList(LinkedList <T> toCopy)
 {
     this.elements = toCopy.elements;
     considering   = this.elements.firstElement;
     indexOn       = -1;
 }
Ejemplo n.º 3
0
 public LinkedList()
 {
     elements    = new ElementProvider();
     considering = elements.firstElement;
     indexOn     = -1;
 }
Ejemplo n.º 4
0
 public ElementProvider()
 {
     numberOfElements = 0;
     lastElement      = new ListElement <T>(default(T));
     firstElement     = new ListElement <T>(default(T), lastElement);
 }
Ejemplo n.º 5
0
 public ListElement(AlsoT value, ListElement <AlsoT> next)
 {
     this.next  = next;
     this.value = value;
 }
Ejemplo n.º 6
0
 // Sets the value being considered
 // to just before index 0;
 public void ResetPointer()
 {
     considering       = elements.firstElement;
     behindConsidering = elements.firstElement;
     indexOn           = -1;
 }