Returns the single String value representation for the given value map.<p>

@param valueMap the value map to create the single String value for

@return the single String value representation for the given value map
164861
private String createValueFromMap(Map<String, String> valueMap) {

        if (valueMap == null) {
            return null;
        }
        StringBuffer result = new StringBuffer(valueMap.size() * 32);
        Iterator<Map.Entry<String, String>> i = valueMap.entrySet().iterator();
        while (i.hasNext()) {
            Map.Entry<String, String> entry = i.next();
            String key = entry.getKey();
            String value = entry.getValue();
            key = replaceDelimiter(key, VALUE_LIST_DELIMITER, VALUE_LIST_DELIMITER_REPLACEMENT);
            key = replaceDelimiter(key, VALUE_MAP_DELIMITER, VALUE_MAP_DELIMITER_REPLACEMENT);
            value = replaceDelimiter(value, VALUE_LIST_DELIMITER, VALUE_LIST_DELIMITER_REPLACEMENT);
            value = replaceDelimiter(value, VALUE_MAP_DELIMITER, VALUE_MAP_DELIMITER_REPLACEMENT);
            result.append(key);
            result.append(VALUE_MAP_DELIMITER);
            result.append(value);
            if (i.hasNext()) {
                result.append(VALUE_LIST_DELIMITER);
            }
        }
        return result.toString();
    }
767091
public ValueMap withMap(String key, Map<String, ?> val) {
        super.put(key, val);
        return this;
    }
871192
public static String asString(Map<?, ?> map) {
        if (map == null) {
            return NULL;
        }
        StringBuilder builder = new StringBuilder();
        builder.append('{');
        boolean first = true;
        for (Map.Entry<?, ?> entry : map.entrySet()) {
            if (first) {
                first = false;
            } else {
                builder.append(',');
            }
            builder.append(asString(entry.getKey()))
                   .append(':')
                   .append(asString(entry.getValue()));
        }
        builder.append('}');
        return builder.toString();
    }
1236685
public Map<String, String> getStringMap(final Map<String, String> map) {
		final int len = getVInt();
		for (int i = 0; i < len; i++) {
			map.put(getString(), getString());
		}
		return map;
	}
272050
static String getValue(Map<String, String> map, String... keys) {
        if (CommonUtils.isEmpty(map)) {
            return null;
        }
        for (String key : keys) {
            String val = map.get(key);
            if (val != null) {
                return val;
            }
        }
        return null;
    }
449138
private SoyMap newSoyMapFromJavaMap(Map<?, ?> javaMap) {
    Map<SoyValue, SoyValueProvider> map = Maps.newHashMapWithExpectedSize(javaMap.size());
    for (Map.Entry<?, ?> entry : javaMap.entrySet()) {
      map.put(convert(entry.getKey()).resolve(), convertLazy(entry.getValue()));
    }
    return SoyMapImpl.forProviderMap(map);
  }
125608
protected Map<String, String> getStringDataMap(final JobDataMap jobDataMap){
        Map<String, String> stringMap = new HashMap<>();
        for (Map.Entry<String, Object> entry : jobDataMap.entrySet()) {
            if(entry.getValue() != null){
                stringMap.put(entry.getKey(), entry.getValue().toString());
            }
        }
        return stringMap;
    }
320160
@SuppressWarnings("unchecked")
    public static String map2JsonString(Map<String, Object> map)
    {
        IStringBuffer sb = new IStringBuffer();
        sb.append('{');
        for ( Map.Entry<String, Object> entry : map.entrySet() )
        {
            sb.append('"').append(entry.getKey().toString()).append("\": ");
            
            Object obj = entry.getValue();
            if ( obj instanceof List<?> ) {
                sb.append(list2JsonString((List<Object>)obj)).append(',');
            } else if (obj instanceof Object[]) {
                sb.append(vector2JsonString((Object[])obj)).append(',');
            } else if (obj instanceof Map<?,?>) {
                sb.append(map2JsonString((Map<String, Object>)obj)).append(',');
            } else if ((obj instanceof Boolean) 
                    || (obj instanceof Byte) || (obj instanceof Short) 
                    || (obj instanceof Integer) || (obj instanceof Long) 
                    || (obj instanceof Float) || (obj instanceof Double)) {
                sb.append(obj.toString()).append(',');
            } else {
                String v = obj.toString();
                int last = v.length() - 1;
                
                if ( v.length() > 1 
                        && ( (v.charAt(0) == '{' && v.charAt(last) == '}' )
                                || (v.charAt(0) == '[' && v.charAt(last) == ']' ) ) 
                ) {
                    sb.append(v).append(',');
                } else {
                    sb.append('"').append(v).append("\",");
                }
            }
        }
        if ( sb.length() > 1 ) {
            sb.deleteCharAt(sb.length()-1);
        }
        sb.append('}');
        
        return sb.toString();
    }
64524
public static Map.Entry<Object, Object> selectMinKeyValue(AssociativeArray keyValueMap) {
        Double minValue=Double.POSITIVE_INFINITY;
        Object minValueKey = null;
        
        for(Map.Entry<Object, Object> entry : keyValueMap.entrySet()) {
            Double value = TypeInference.toDouble(entry.getValue());
            if(value!=null && value<minValue) {
                minValue=value;
                minValueKey=entry.getKey();
            }
        }
        
        return new AbstractMap.SimpleEntry<>(minValueKey, keyValueMap.get(minValueKey));
    }
825965
@Override
    public <K, V> MapAttribute<? super X, K, V> getMap(String paramName, Class<K> keyClazz, Class<V> valueClazz)
    {
        PluralAttribute<X, ?, ?> declaredAttrib = getDeclaredPluralAttribute(paramName);

        if (onCheckMapAttribute(declaredAttrib, valueClazz))
        {
            if (valueClazz != null && valueClazz.equals(((MapAttribute<X, K, V>) declaredAttrib).getKeyJavaType()))
            {
                return (MapAttribute<X, K, V>) declaredAttrib;

            }
        }

        PluralAttribute<? super X, ?, ?> superAttrib = getPluralAttriute(paramName);

        if (onCheckMapAttribute(superAttrib, valueClazz))
        {
            if (valueClazz != null && valueClazz.equals(((MapAttribute<? super X, K, V>) superAttrib).getKeyJavaType()))
            {
                return (MapAttribute<? super X, K, V>) superAttrib;

            }
        }

        throw new IllegalArgumentException(
                "attribute of the given name and type is not present in the managed MapAttribute type, for name:"
                        + paramName + " , value type:" + valueClazz + "key tpye:" + keyClazz);
    }
980189
public static CmsSearchFieldMappingType valueOf(String value) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(value)) {
            return null;
        }
        value = value.trim().toLowerCase();
        if (STR_CONTENT.equals(value)) {
            return CONTENT;
        } else if (STR_PROPERTY.equals(value)) {
            return PROPERTY;
        } else if (STR_PROPERTY_SEARCH.equals(value)) {
            return PROPERTY_SEARCH;
        } else if (STR_ITEM.equals(value)) {
            return ITEM;
        } else if (STR_DYNAMIC.equals(value)) {
            return DYNAMIC;
        } else if (STR_ATTRIBUTE.equals(value)) {
            return ATTRIBUTE;
        }
        return null;
    }
1131849
public static ValueMap map(Object... map) {
        if (map.length / 2 * 2 != map.length)
            throw new IllegalArgumentException("Arguments should be <String> key - <?> value pairs");

        Builder builder = new Builder();
        for (int i = 0; i < map.length; i += 2)
            builder.put((String)map[i], map[i + 1]);

        return builder.build();
    }
1184178
private static String convertMap2Pair(Map<String, String> map) {

        if (CommonUtils.isEmpty(map)) {
            return StringUtils.EMPTY;
        }

        StringBuilder sb = new StringBuilder(128);
        for (Map.Entry<String, String> entry : map.entrySet()) {
            sb.append(getKeyPairs(entry.getKey(), entry.getValue()));
        }

        return sb.toString();
    }
394677
public static String mapToJson(final Map<String, Object> map) {
        try {
            return MAPPER.writeValueAsString(map);
        } catch (JsonProcessingException e) {
            return null;
        }
    }
445638
public static Map mapValues(Mapper mapper, Map map) {
        return mapValues(mapper, map, false);
    }
958951
private <T> String writeMapValues(String mapName, MultiValueMap<T> map) {
        StringBuffer buffer = new StringBuffer();
        buffer.append("        " + mapName + "\n");
        for (Iterator<T> names = map.names(); names.hasNext();) {
            T name = names.next();
            buffer.append("            ").append(name.toString()).append("\n");
            String[] values = map.getStringArray(name);
            for (String element : values) {
                buffer.append("                ").append(element).append("\n");
            }
        }
        return buffer.toString();
    }
497952
private static ValueMap toValueMap(Resource resource) {
        ValueMap propertyMap = resource.adaptTo(ValueMap.class);
        if (propertyMap != null) {
            propertyMap = new PrimitiveSupportingValueMap(propertyMap);
        }
        return propertyMap;
    }