Implementation of a Doubly Linked Deque in Java