【发布时间】:2013-08-28 04:51:06
【问题描述】:
我有这样的地图:
Map<Integer, MyEntry> map = new HashMap<Integer, MyEntry>();
MyEntry 是:
public class MyEntry {
private String title;
private String value;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
将值放入 map 后,我想对其进行排序。第一个元素最小,最后一个元素最大。
【问题讨论】: