public static void main(String[] args) {
        PriorityQueue<Integer> queue = new PriorityQueue<>(new Compare());
        queue.offer(1);
        queue.offer(2);
        queue.offer(3);
        while (!queue.isEmpty()) {
            System.out.println(queue.poll());
        }
    }