List of utility methods to do Map Put
void | putLowerNotNull(Map Put a lowercase version of k in the map if it is non-null if (k != null)
m.put(k.toLowerCase(), v);
|
void | putMap(Map map, Object... args) Add entries to a Map. int pos = 0; Object key = null; for (Object arg : args) { if ((pos & 1) != 0) map.put(key, arg); else key = arg; ++pos; ... |
void | putMap(Map target, Map put Map for (Entry<K, V> entry : map.entrySet()) {
target.put(entry.getKey().toString(), entry.getValue().toString());
|
boolean | putMapBoolean(Map put Map Boolean return params.containsKey(key) && !params.get(key).equals(""); |
Map | putMapBooleanList(Map put Map Boolean List Map<String, Object> resultMap = new HashMap<>(); Arrays.stream(keys).filter(key -> params.containsKey(key) && !params.get(key).equals("")) .forEach(key -> resultMap.put(change(key), params.get(key))); return resultMap; |
void | putMapByPair(String pair, Map m) put Map By Pair if (null == pair || "".equals(pair)) { return; int indexOf = pair.indexOf("="); if (-1 != indexOf) { String k = pair.substring(0, indexOf); String v = pair.substring(indexOf + 1, pair.length()); if (null != k && !"".equals(k)) { ... |
void | putMapEntry(Map Put name and value pair in map. String[] newValues = null; String[] oldValues = map.get(name); if (oldValues == null) { newValues = new String[1]; newValues[0] = value; } else { newValues = new String[oldValues.length + 1]; System.arraycopy(oldValues, 0, newValues, 0, oldValues.length); ... |
boolean | putMapNotNullKey(Map add key-value pair to map, key need not null if (map == null || key == null) { return false; map.put(key, value); return true; |
void | putMapValue(String path, Object value, Map put Map Value if (path == null || path.trim().isEmpty()) { return; String[] split = path.split("\\."); Map<String, Object> targetMap = map; for (int i = 0; i < split.length - 1; i++) { String key = split[i]; Object intermediateMap = (Map<String, Object>) targetMap.get(key); ... |
Map | putModifiedAttribute(Map aMap, String name, Object value) put Modified Attribute if (aMap == null) { aMap = new HashMap(); aMap.put(name, value); return aMap; |