标签:util pre ota entry value int rri blog log
package com.JiHeTotal; import java.util.Comparator; import java.util.Map; import java.util.Map.Entry; public class MyComparator implements Comparator<Map.Entry<String, Double>> { @Override public int compare(Entry<String, Double> o1, Entry<String, Double> o2) { if (o1.getValue() > o2.getValue()) { return 1; } else if (o1.getValue() < o2.getValue()) { return -1; } else { return 0; } } }
标签:util pre ota entry value int rri blog log
原文地址:http://www.cnblogs.com/java-le/p/6443472.html