com.jpattern.orm.util.MapUtil Maven / Gradle / Ivy
package com.jpattern.orm.util;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
/**
*
* @author ufo
*
*/
public abstract class MapUtil {
public static String keysToString(final Map, ?> map) {
Iterator> iterable = map.entrySet().iterator();
StringBuilder keys = new StringBuilder();
while (iterable.hasNext()) {
keys.append( ((Entry,?>) iterable.next()).getKey().toString() );
if (iterable.hasNext()) {
keys.append( ", " );
}
}
return keys.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy