Java Android中的新价值对是什么?

Java Android中的新价值对是什么?,java,android,Java,Android,我无法理解使用新BasicNameValuePairusername(用户名)的概念。它是否与ArrayList索引相关?使用它的优点是什么?NameValuePairs类似于关联数组。这些操作不是由整数索引执行的,而是由字符串执行的。 它们看起来像这样 HttpPost post = new HttpPost("http://www.tree.com/action.php?fun=login"); List<NameValuePairs> Params= new ArrayList

我无法理解使用新BasicNameValuePairusername(用户名)的概念。它是否与ArrayList索引相关?使用它的优点是什么?

NameValuePairs类似于关联数组。这些操作不是由整数索引执行的,而是由字符串执行的。 它们看起来像这样

HttpPost post = new HttpPost("http://www.tree.com/action.php?fun=login");
List<NameValuePairs> Params= new ArrayList<NameValuePairs>();
Params.add(new BasicNameValuePair("username",username));
Post.setEntity(UrlEncodedFormEntity(Params));

我找不到该方法的任何引用。请看:这是否意味着该键充当数组列表的索引
"One"->"Value1"
"Two"->"Value2"
"Three"->"Value3"