I was wondering since the API says that the remove() function returns a boolean type, how do I grab the element's info when I remove it. That is, is it possible to do:
class Node {
int stuff;
}
PriorityQueue <Node> nodes = new PriorityQueue <Node> ();
Node temp = nodes.remove(0);
Assuming off course, that the nodes PQ has a bunch of nodes in it. Would temp node have the information of the removed node or would that not work since remove() returns a boolean
Collectionfor the job.