List of utility methods to do HashMap Convert
Object[][] | hashMapToArray(HashMap Converts a HashMap to a 2-column array {key, value} return mapToArray(map);
|
String | HashMapToParamsString(HashMap Hash Map To Params String String output = ""; for (String key : params.keySet()) { output += key + ":" + params.get(key) + " "; return output.trim(); |
String | hashMapToString(HashMap Create a string representation of hash map as key="value" key="value" ... StringBuffer text = new StringBuffer(); boolean isFirst = true; for (Map.Entry<String, ?> e : map.entrySet()) { if (!isFirst) text.append(' '); text.append(e.getKey()).append("=\"").append(e.getValue().toString()).append('"'); isFirst = false; return text.toString(); |
ArrayList | toArrayListHashMapStrObj(Object object) replacement of casting as from Object to ArrayList<HashMap<String, Object>> without annoying warning. if (object == null) { return null; return (ArrayList<HashMap<String, Object>>) object; |