// Path: architecture/src/main/java/com/jiang/android/architecture/okhttp/Param.java
// public class Param {
//     public Param(String key,String value) {
//         this.key = key;
//         this.value = value;
//     }
// 
//     public String key;
//     public String value;
// 
// 
//     @Override
//     public String toString() {
//         return key + "=" + value;
//     }
// }


import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.jiang.android.architecture.okhttp.Param;
/**
 * created by jiang, 10/23/15
 * Copyright (c) 2015, jyuesong@gmail.com All Rights Reserved.
 * *                #                                                   #
 * #                       _oo0oo_                     #
 * #                      o8888888o                    #
 * #                      88" . "88                    #
 * #                      (| -_- |)                    #
 * #                      0\  =  /0                    #
 * #                    ___/`---'\___                  #
 * #                  .' \\|     |# '.                 #
 * #                 / \\|||  :  |||# \                #
 * #                / _||||| -:- |||||- \              #
 * #               |   | \\\  -  #/ |   |              #
 * #               | \_|  ''\---/''  |_/ |             #
 * #               \  .-\__  '-'  ___/-. /             #
 * #             ___'. .'  /--.--\  `. .'___           #
 * #          ."" '<  `.___\_<|>_/___.' >' "".         #
 * #         | | :  `- \`.;`\ _ /`;.`/ - ` : | |       #
 * #         \  \ `_.   \_ __\ /__ _/   .-` /  /       #
 * #     =====`-.____`.___ \_____/___.-`___.-'=====    #
 * #                       `=---='                     #
 * #     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   #
 * #                                                   #
 * #               佛祖保佑         永无BUG              #
 * #                                                   #
 */

package com.jiang.android.architecture.okhttp.utils;





/**
 * Created by jiang on 10/23/15.
 */
public class HeaderUtils {

    public static List<Param> validateHeaders(Map<String, String> header) {
        if (header == null || header.size() == 0)
            return null;
        List<Param> results = new LinkedList<>();
        Set<Map.Entry<String, String>> entrySet = header.entrySet();
        for (Map.Entry<String, String> entry : entrySet) {
            Param param = new Param(entry.getKey(), entry.getValue());
            results.add(param);
        }
// Path: architecture/src/main/java/com/jiang/android/architecture/okhttp/Param.java
// public class Param {
//     public Param(String key,String value) {
//         this.key = key;
//         this.value = value;
//     }
// 
//     public String key;
//     public String value;
// 
// 
//     @Override
//     public String toString() {
//         return key + "=" + value;
//     }
// }


// Path: architecture/src/main/java/com/jiang/android/architecture/okhttp/utils/HeaderUtils.java
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.jiang.android.architecture.okhttp.Param;

/**
 * created by jiang, 10/23/15
 * Copyright (c) 2015, jyuesong@gmail.com All Rights Reserved.
 * *                #                                                   #
 * #                       _oo0oo_                     #
 * #                      o8888888o                    #
 * #                      88" . "88                    #
 * #                      (| -_- |)                    #
 * #                      0\  =  /0                    #
 * #                    ___/`---'\___                  #
 * #                  .' \\|     |# '.                 #
 * #                 / \\|||  :  |||# \                #
 * #                / _||||| -:- |||||- \              #
 * #               |   | \\\  -  #/ |   |              #
 * #               | \_|  ''\---/''  |_/ |             #
 * #               \  .-\__  '-'  ___/-. /             #
 * #             ___'. .'  /--.--\  `. .'___           #
 * #          ."" '<  `.___\_<|>_/___.' >' "".         #
 * #         | | :  `- \`.;`\ _ /`;.`/ - ` : | |       #
 * #         \  \ `_.   \_ __\ /__ _/   .-` /  /       #
 * #     =====`-.____`.___ \_____/___.-`___.-'=====    #
 * #                       `=---='                     #
 * #     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   #
 * #                                                   #
 * #               佛祖保佑         永无BUG              #
 * #                                                   #
 */

package com.jiang.android.architecture.okhttp.utils;





/**
 * Created by jiang on 10/23/15.
 */
public class HeaderUtils {

    public static List<Param> validateHeaders(Map<String, String> header) {
        if (header == null || header.size() == 0)
            return null;
        List<Param> results = new LinkedList<>();
        Set<Map.Entry<String, String>> entrySet = header.entrySet();
        for (Map.Entry<String, String> entry : entrySet) {
            Param param = new Param(entry.getKey(), entry.getValue());
            results.add(param);
        }
        return results;