// Textbook fragment 05.18 public E getFirst() throws EmptyDequeException { if (isEmpty()) throw new EmptyDequeException("Deque is empty."); return header.getNext().getElement(); }