List<TreemallNewCycleBannerVO> list = new ArrayList<TreemallNewCycleBannerVO>(cycleBannerTempMap.values());
Collections.sort(list, new Comparator<TreemallNewCycleBannerVO>() {
public int compare(TreemallNewCycleBannerVO o1,TreemallNewCycleBannerVO o2) {
Integer priority1 = Integer.parseInt(o1.getPriority());
Integer priority2 = Integer.parseInt(o2.getPriority());
return (priority1<priority2 ? -1 : (priority1==priority2 ? 0 : 1));
}
});
沒有留言:
張貼留言