按中文字母排序git
使用https://github.com/belerweb/pinyin4j
github
/**web
* 获得中文首字母缩写}ide
public class Demo implements Serializable, Comparable<Demo>{this
private String sortKey;排序
public String getSortKey() {
return sortKey;
}get
public void setSortKey(String sortKey) {
this.sortKey = sortKey;
}
it
@Override
public int compareTo(Demo another) {
return this.getSortKey().compareTo(another.getSortKey());
}
class
}
im