Fixed Bug in LinkedList

Fixed a bug in LinkedList - the size of the list never increased when
elements were added.
This commit is contained in:
SenseiKiwi 2013-12-30 01:22:31 -04:00
parent d2da74ea76
commit 27b21f6674

View file

@ -226,6 +226,7 @@ public class LinkedList<T> implements Iterable<T>
Node<T> addition = new Node(node, node.next, data, this);
node.next = addition;
addition.next.prev = addition;
size++;
return addition;
}