package com.ffii.core.utils;

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

/**
 * @author fung
 */
public class MapBuilder<K, V> {

    private Map<K, V> args;

    public MapBuilder() {
        args = new HashMap<K, V>();
    }

    public MapBuilder(Map<K, V> args) {
        this.args = args;
    }

    public MapBuilder<K, V> add(K key, V value) {
        args.put(key, value);
        return this;
    }

    public Map<K, V> toMap() {
        return args;
    }

    @Override
    public String toString() {
        return args.toString();
    }
}