疯狂的狮子Li
2022-07-08 25f9f72366956713b0229e1b10d0e16f624d2d51
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package com.ruoyi.demo.controller.queue;
 
import java.util.Comparator;
 
/**
 * 比较器 注意不允许使用 内部类或匿名类或lambda表达式 会找不到类
 *
 * @author Lion Li
 * @version 3.6.0
 */
public class PriorityDemoComparator implements Comparator<PriorityDemo> {
    @Override
    public int compare(PriorityDemo pd1, PriorityDemo pd2) {
        return Integer.compare(pd1.getOrderNum(), pd2.getOrderNum());
    }
}