这是我的朋友对象:
public class Friend {
public String firstname;
public String lastname;
...
我想根据 firstname 字段对Friend ArrayList进行排序,并使用对帐号重音进行排序:
ArrayList<Friend> mFriends;
...
// Sort friend by firstname
Collections.sort(mFriends, new Comparator<Friend>() {
@Override
public int compare(Friend o1, Friend o2) {
return o1.firstname.compareTo(o2.firstname);
}
});
那么,我该如何添加重音条件?