fromPairsString


Description:

public static HashMap<string,string> fromPairsString (ArrayList<Pair<string,string>> pairs)

Creates a HashMap from a list of key-value Pairs. If duplicate keys exist, later Pairs overwrite earlier ones.

Example:

    var pairs = new ArrayList<Pair<string, string> > ();
pairs.add (new Pair<string, string> ("a", "1"));
pairs.add (new Pair<string, string> ("b", "2"));
var map = Maps.fromPairsString (pairs);
// map["a"] == "1", map["b"] == "2"

Parameters:

pairs

the list of key-value Pairs.

Returns:

a new HashMap.