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

com.cybersource.authsdk.util.PrettyPrintingMap Maven / Gradle / Ivy

The newest version!
package com.cybersource.authsdk.util;

import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;

public class PrettyPrintingMap {
	private Map map;

	public PrettyPrintingMap(Map map) {
		this.map = map;
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();
		Iterator> iter = map.entrySet().iterator();
		while (iter.hasNext()) {
			Entry entry = iter.next();
			sb.append(entry.getKey());
			sb.append(": ");
			sb.append(entry.getValue());
			if (iter.hasNext()) {
				sb.append("\n");
			}
		}
		return sb.toString();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy