net.sf.jabb.util.col
Class MapLister
java.lang.Object
net.sf.jabb.util.col.MapLister
public class MapLister
- extends Object
An utility to list the content of the Map in a formatted manner.
把Map里的内容格式化输出的工具。
- Author:
- Zhengmao HU (James)
|
Method Summary |
static String |
listToString(Map<?,?> map)
Print the content of the Map in a newly created String,
entries are sorted by key, formatted as "key\t= value\n".
把Map里的内容列在String里,Map里的每个entry占一行,按key排序,
每行的格式为“key\t= value\n”。 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapLister
public MapLister()
listToString
public static String listToString(Map<?,?> map)
- Print the content of the Map in a newly created String,
entries are sorted by key, formatted as "key\t= value\n".
把Map里的内容列在String里,Map里的每个entry占一行,按key排序,
每行的格式为“key\t= value\n”。
- Parameters:
map - The Map object for which the content need to be listed.
需要列出内容的Map对象
- Returns:
- A String that holds formated content of the Map.
含有格式化过的Map内容的String
Copyright © 2012. All Rights Reserved.