Java Utililty Methods Map Put

List of utility methods to do Map Put

Description

The list of methods to do Map Put are organized into topic(s).

Method

voidput(Map map, Object key, int value)
put
map.put(key, new Integer(value));
voidput(Map map, String k1, Object v1, String k2, Object v2)
put
map.put(k1, v1);
map.put(k2, v2);
voidput(Map map, String keyValuePair)
Adds an entry to a Map .
int posOfSep = keyValuePair.indexOf('=');
if (posOfSep == -1)
    throw new IllegalArgumentException("Invalid keu-value specification: " + keyValuePair);
String key = keyValuePair.substring(0, posOfSep);
String value = keyValuePair.substring(posOfSep + 1);
map.put(key, value);
Vput(Map aMap, K aKey, V aValue)
Adds given key and value to given map (removes key if value is null).
if (aValue == null)
    return aMap.remove(aKey);
return aMap.put(aKey, aValue);
Mapput(Map map, K key, V value)
put
V valueOld = map.get(key);
if (valueOld == null) {
    map.put(key, value);
return map;
voidput(Map map, K key, V value)
Associates the specified value with the specified key in this map.
if (map != null) {
    map.put(key, value);
voidput(Map map, String key, Object value)
put
Map<String, Object> m = resolve(map, key);
String k = resolveKey(key);
m.put(k, value);
voidput(Map structure, String name, Object object)
Puts an object into a map
if (name != null && object != null) {
    structure.put(name, object);
voidput(ThreadLocal> threadLocal, Object key, String value)
put
Map<Object, String> map = threadLocal.get();
if (map == null) {
    map = new HashMap<>();
if (!map.containsKey(key)) {
    map.put(key, value);
    threadLocal.set(map);
voidput2DayOfWeekMaps(int pDayOfWeek, String pDayName)
put Day Of Week Maps
dayOfWeek2DayName[pDayOfWeek] = pDayName;
dayName2DayOfWeek.put(pDayName, pDayOfWeek);