Here you can find the source of copyLowerCaseMap(Map, ?> map)
Parameter | Description |
---|---|
map | HashMap from a RETS transaction |
public static Map<String, Object> copyLowerCaseMap(Map<?, ?> map)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { /**/*from w ww . jav a 2 s. co m*/ * * @param map * HashMap from a RETS transaction * * @return keyMap with keys in lowercase */ public static Map<String, Object> copyLowerCaseMap(Map<?, ?> map) { if (map == null) { return null; } HashMap<String, Object> keyMap = new HashMap<String, Object>(); Iterator<?> keys = map.keySet().iterator(); while (keys.hasNext()) { String key = (String) keys.next(); Object value = map.get(key); if (key != null) { key = key.toLowerCase(); } keyMap.put(key, value); } return keyMap; } }