org.scribe.utils.MapUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aem-sdk-api Show documentation
Show all versions of aem-sdk-api Show documentation
The Adobe Experience Manager SDK
package org.scribe.utils;
import java.util.Map;
/**
* @author: Pablo Fernandez
*/
public class MapUtils
{
private MapUtils(){}
public static String toString(Map map)
{
if (map == null) return "";
if (map.isEmpty()) return "{}";
StringBuilder result = new StringBuilder();
for(Map.Entry entry : map.entrySet())
{
result.append(String.format(", %s -> %s ", entry.getKey().toString(), entry.getValue().toString()));
}
return "{" + result.substring(1) + "}";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy