List of utility methods to do Map Put
void | putMultiEntry(Map Convenient method to put several entry in a map having the same value at once. for (final K key : keys) { map.put(key, value); |
Map | putMultiple(Map put Multiple Object existingValue = map.get(key); if (existingValue == null) map.put(key, value); else if (existingValue instanceof List) ((List) existingValue).add(value); else map.put(key, buildList(existingValue, value)); return map; ... |
void | putNotDup(Map put Not Dup if (tbl.containsKey(key)) { String v = tbl.get(key); if (!contains(v, value)) { tbl.put(key, v + "," + value); } else { tbl.put(key, value); |
Map | putObject(Map put Object if (map == null) { map = new HashMap<T, U>(); map.put(key, value); return map; |
void | putObjectsInMultiMap(Map Utility function for placing objects in a Map. if (multiMap == null) return; List<List<String>> tempList = multiMap.get(key); if (tempList == null) { tempList = new ArrayList<List<String>>(); multiMap.put(key, tempList); tempList.add(stringPair); ... |
void | putOrCreateList(Map put Or Create List List<V> list; list = map.get(key); if (list == null) { list = new ArrayList<>(); list.add(value); map.put(key, list); } else { list.add(value); ... |
void | putOrRemove(Map map, String key, Object obj) put Or Remove if (obj == null) { map.remove(key); } else { map.put(key, obj); |
void | putPairs(Map put Pairs for (int i = 1; i < pairs.length; i += 2) map.put((K) pairs[i - 1], (V) pairs[i]); |
void | putParameter(String key, String value, Map put Parameter if (key.startsWith("$P{")) { Object obj = value; if (value.startsWith("[") && value.endsWith("]")) { String[] array = value.substring(1, value.length() - 1).split(","); obj = array; map.put(key.substring(3, key.length() - 1), obj); |
void | putPreferenceStoredMapValue(String keyOfPreference, String keyInMap, Object value) Put value with key keyInMapinto the map whose key is keyOfPreference Map map = getPreferenceStoredMap(keyOfPreference); map.put(keyInMap, value); setPreferenceStoredMap(keyOfPreference, map); |