Tag Archives: map

Java: Map遍历

// 2. 遍历map中所有的元素
Iterator iter = mapSheet.entrySet().iterator();
while(iter.hasNext()) {
Entry entry = iter.next();
int sheetIndex = entry.

More…

Posted in Java | Tagged , , | 1 Comment

使用ArrayList代理进行Map的排序

某Map中散乱的存放着如下信息:
abce.com (1), cde.com (1), abc.com (3), def.com (1), abd.com (2), sfaf.com (1), bcd.com (2)
为了进行排寻 使用ArrayList的sort进行排序.
通过new ArrayL

More…

Posted in Java | Tagged , , | Leave a comment