public void ForEach(ForEachLambda cb) { LinkedNode <T> temp = head; do { cb(temp); temp = temp.nextNode; } while (temp != head); }
public IEnumerator <T> GetEnumerator() { LinkedNode <T> temp = head; do { yield return(temp.data); temp = temp.nextNode; } while (temp != head); }
public void Append(T data) { LinkedNode <T> node = new LinkedNode <T>(data); if (head == null) { head = node; head.nextNode = node; head.previousNode = node; } else { node.previousNode = head.previousNode; node.nextNode = head; head.previousNode.nextNode = node; head.previousNode = node; } }