public eeListNode(eeObject obj, eeNumber index, eeListNode prev, eeListNode next) { this.obj = obj; this.index = index; this.prev = prev; this.next = next; }
private IEnumerable <eeListNode> Iterate() { eeListNode currNode = this.HeadNode; while (currNode != null) { yield return(currNode); currNode = currNode.next; } }
public void Append(eeObject obj) { _count += eeNumber.ONE; if (LastNode == null) // if this is the second object to enter the list { var node = new eeListNode(obj.Copy(), _count.Copy(), HeadNode, null); LastNode = node; HeadNode.next = node; return; } var newNode = new eeListNode(obj.Copy(), _count.Copy(), LastNode, null); this.LastNode.next = newNode; this.LastNode = newNode; }
public eeList(eeObject firstObject) { var firstNode = new eeListNode(firstObject, _count.Copy(), null, null); this.HeadNode = firstNode; }