Code example for Joiner.MapJoiner

Methods: join

0
        return (parameters.size() <= 0) ? EMPTY_STRING : doFormUrlEncode(parameters);
    } 
 
    public static String doFormUrlEncode(Map<String, ? extends Object> params) {
        Map<String, String> urlEncodeMap = Maps.transformValues(params, new formUrlEncodeFunc());
        return queryMapJoiner.join(urlEncodeMap);
    } 
 
    /** 
     * Percent encodes a string 
     *  
     * @param string plain string 
     * @return percent encoded string 
     */ 
    public static String percentEncode(String string) {
        String encoded = formURLEncode(string);
        for (EncodingRule rule : ENCODING_RULES) {
            encoded = rule.apply(encoded);
        } 
        return encoded;
Experience pair programming with AI  Get Codota for Java