fix reversed logic in LinkedList.addFirst()/addLast()

This commit is contained in:
Joel Dice 2007-08-21 22:01:37 -06:00
parent a68505ff48
commit 84028e7f51

View File

@ -32,8 +32,8 @@ public class LinkedList<T> implements List<T> {
if (front == null) {
front = rear = c;
} else {
c.prev = rear;
rear = c;
c.next = front;
front = c;
}
}
@ -43,8 +43,8 @@ public class LinkedList<T> implements List<T> {
if (front == null) {
front = rear = c;
} else {
c.next = front;
front = c;
c.prev = rear;
rear = c;
}
}