All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jpattern.orm.util.MapUtil Maven / Gradle / Ivy

There is a newer version: 6.3.0
Show newest version
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