I am implementing a `PriorityQueue` in my program. For that I have also implemented `compareTo()`. The `compareTo()` is being called when I perform `add()`, which is expected. But it is also called when I perform `poll()`. I thought that the function of **poll()** is just to remove the head. Why does it need to call **compareTo()**? Removing the head implies setting a new head when the data structure is a priority heap, which implies a comparison.