Double linked list implementation in Java