package com.ifavine.pay.utils;

import com.ifavine.pay.vo.LocalContact;

import java.util.Comparator;

public class ContactSorting implements Comparator<LocalContact> {

    @Override
    public int compare(LocalContact l1, LocalContact l2) {
        //给我两个对象，我只比较他的字母
        if (l2.getIndex().equals("#")) {
            return -1;
        } else if (l1.getIndex().equals("#")) {
            return 1;
        } else {
            return l1.getIndex().compareTo(l2.getIndex());
        }
    }
}