code: public final Object getMin()
      throws NoSuchElementException
    {
      PriorityQueueNode max = null;
      if (size == 0)
        throw new NoSuchElementException();
          
      max = elements[0];
      setElement(elements[--size], 0);
      heapify(0);
  
      return max.value;
    }
docs: Dequeue the highest priority element from the queue.
  
  @return the highest priority object.
  @throws NoSuchElementException if the queue is empty.