code: @Override
      public E element() {
          @SuppressWarnings("unchecked") E result = (E) elements[head];
          if (result == null)
              throw new NoSuchElementException();
          return result;
      }
docs: Retrieves, but does not remove, the head of the queue represented by
  this queue.  This method differs from {@link #peek peek} only in
  that it throws an exception if this queue is empty.
  
  @return the head of the queue represented by this queue
  @throws NoSuchElementException {@inheritDoc}