public Object next() { LinkedNode <T> toReturn = currentEl; if (currentEl.Prev != null) { currentEl = currentEl.Prev; } counter++; return(toReturn.Value); }
public void Add(T value) { LinkedNode <T> newNode = new LinkedNode <T>(value); if (head == null) { head = newNode; tail = head; } else { tail.Next = newNode; newNode.Prev = tail; tail = newNode; } length++; }
public CustomLinkedListIterator(CustomLinkedList <T> arg) { myList = arg; currentEl = myList.tail; counter = 0; }