code: public E remove(){
          E head = queue.poll();      // remove head from queue
          if(head != null){
              set.remove(head);       // also remove this element from the hash set
          }
          return head;
      }
docs: Retrieves and removes the head of the queue, or returns <code>null</code> if the queue is empty.
  The head of the queue corresponds to the least recently added item (if any).
  
  @return head of the queue, <code>null</code> if queue is empty