List of utility methods to do Map Put
void | putBoolean(Map put Boolean properties.put(key, value ? Boolean.TRUE : Boolean.FALSE); |
Object | putByFullKey(Map map, String key, Object value) put By Full Key if (key.indexOf(MAP_KEY_SEPARATOR) != -1) { String subMapKey = key.substring(0, key.indexOf(MAP_KEY_SEPARATOR)); String nextKey = key.substring(subMapKey.length() + 1); Map subMap; if (map.containsKey(subMapKey)) { subMap = (Map) map.get(subMapKey); } else { subMap = new HashMap(); ... |
Map> | putCheckedObjectInInnerMap(Map> mapValues, A key, K innerKey, V obj) Puts an object to an inner Map of the given Map ( initializes it first if null ) Map<K, V> innerMap = null; if (mapValues != null && mapValues.containsKey(key)) { innerMap = mapValues.get(key); innerMap = addCheckedObjectInMap(innerMap, innerKey, obj); mapValues = addCheckedObjectInMap(mapValues, key, innerMap); return mapValues; |
void | putClassToMap(String extensionId, String key, Class> className) put Class To Map Map<String, List<Class<?>>> map; if (!extensionClassMap.containsKey(extensionId)) { map = new HashMap<String, List<Class<?>>>(); extensionClassMap.put(extensionId, map); } else { map = extensionClassMap.get(extensionId); List<Class<?>> classList; ... |
void | putData(Map data, String name, Object value) put Data String[] names = name.split("[.]"); Map currentMap = data; for (int i = 0; i < names.length; i++) { if (i < (names.length - 1)) { Map cmap = (Map) currentMap.get(names[i]); if (cmap == null) { cmap = new HashMap(); currentMap.put(names[i], cmap); ... |
void | putDataInToMap(String className, String MethodName) put Data In To Map mapModuleName.clear(); mapModuleName.put("className", className); mapModuleName.put("methodName", MethodName); |
void | putDeepValue(Map put Deep Value HashMap subMap = (HashMap) map; String[] propertyPath = keyPath.toString().split("\\."); int j = 0; for (; j < propertyPath.length - 1; j++) { String property = propertyPath[j]; Object value = subMap.get(property); if ((value == null) || !(value instanceof Map)) { value = new HashMap<>(); ... |
void | putIfAbsent(final Map put If Absent for (Map.Entry<K, V> entry : from.entrySet()) {
to.putIfAbsent(entry.getKey(), entry.getValue());
|
void | putIfAbsent(Map put If Absent if (from == null || to == null) { return; for (Map.Entry<K, V> entry : from.entrySet()) { if (!to.containsKey(entry.getKey())) { to.put(entry.getKey(), entry.getValue()); |
V | putIfAbsent(Map Backwards compatible Map#putIfAbsent to support < Android API 24. V val = map.get(key); if (val == null) { val = map.put(key, value); return val; |