class OrderedComparator implements Comparator<T>, Serializable {

    @Override
    public int compare(T o1, T o2) {
        // order一样的情况下，顺序不变
        return order ? o1.getOrder() - o2.getOrder() :
            o2.getOrder() - o1.getOrder();
    }

    public  OrderedComparator();
    public  OrderedComparator(boolean smallToLarge);

}