ちょっと忘れていたので、ここにメモしておく。
普通PriorityQueueはminimum ヒープです。
PriorityQueue pq= new PriorityQueue();
pq.poll(); //これは最小の要素を取得する
これを最大の値(maximum heap)から順に取得できるようにするには、
PriorityQueue pq = new PriorityQueue<>(Collections.reverseOrder());
とすればいい。
後、オブジェクトの特定のフィールドを使う場合は
PriorityQueue pq = new PriorityQueue(Comparator.comparing(SumTree::getAge));
もしくは
PriorityQueue pq = new PriorityQueue(Comparator.comparing(SumTree::getAge).reversed());
とすればいい。