package com.msb.strategy; /** * @Author bingor * @Date 2022-10-06 17:56 * @Description: com.msb.strategy * @Version: 1.0 */ public class CatWeightComparator implements Comparator { @Override public int compare(Cat2 o1, Cat2 o2) { if(o1.getWeight() < o2.getWeight()) return -1; else if(o1.getWeight() > o2.getWeight()) return 1; else return 0; } }