我有这样的地图:
Map<Integer, MyEntry> map = new HashMap<Integer, 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后,我希望对其进行排序。第一个元素最小,最后一个元素最大。