日期:2014-05-20 浏览次数:20757 次
public class FindMinIndex {
private static Set<String> tableIndexSet = new HashSet<String>();
// private static Logger logger = LogManager.getLogger(FindMinIndex.class);
public static void main(String[] args) {
for (int i = 0; i < 10000; i++) {
tableIndexSet.add(i + ".10.2.3");
tableIndexSet.add(i + ".15.5.4");
tableIndexSet.add(i + ".20.2.4");
tableIndexSet.add(i + ".5.2.4");
tableIndexSet.add(i + ".5.2.3");
tableIndexSet.add(i + ".5.2.6");
}
//System.out.println(tableIndexSet.size());
//tableIndexSet.clear();
long begin = System.currentTimeMillis();
System.out.println(findMinTableIndexe1("1"));
long end = System.currentTimeMillis();
System.out.println("1 use time:" + (end - begin));
begin = System.currentTimeMillis();
System.out.println(findMinTableIndexe2("1"));
end = System.currentTimeMillis();
System.out.println("2 use time:" + (end - begin));
}
public static String findMinTableIndexe1(final String tableOid) {
String result = null;