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

com.googlecode.googleplus.PlusUtils Maven / Gradle / Ivy

The newest version!
package com.googlecode.googleplus;

import java.util.HashMap;
import java.util.Map;

public class PlusUtils {

    public static String addParameters(String url, Map params) {
        StringBuilder builder = new StringBuilder(url);
        String delimiter = "?";
        for (Map.Entry entry : params.entrySet()) {
            builder.append(delimiter);
            builder.append(entry.getKey() + "=" + entry.getValue());
            delimiter = "&";
        }

        return builder.toString();
    }

    public static Map createParamMap(Paging paging) {
        Map params = new HashMap();
        if (paging != null) {
            paging.fillParameterMap(params);
        }
        return params;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy