list<map<string,object>>怎么转换为list
1个回答
展开全部
list<map<string,object>>怎么转换为list
map.values怎么转换为list或者string[]
if (areas != null)
for (Area eachArea : areas) {
areaNames1.put(eachArea.getId(),eachArea.getName());
}
ArrayAdapter<String> areaAdapter = new ArrayAdapter<String>(context,
android.R.layout.simple_spinner_item, ****);
(String[])areaNames1.values().toArray()我用的这个不行呀
谁能帮我ko啊。
Map<String, String> map = new HashMap<String, String>();
map.put("1", "1");
map.put("2", "2");
map.put("3", "3");
map.put("4", "4");
Collection<String> valueCollection = map.values();
final int size = valueCollection.size();
List<String> valueList = new ArrayList<String>(valueCollection);
String[] valueArray = new String[size];
map.values().toArray(valueArray);
map.values怎么转换为list或者string[]
if (areas != null)
for (Area eachArea : areas) {
areaNames1.put(eachArea.getId(),eachArea.getName());
}
ArrayAdapter<String> areaAdapter = new ArrayAdapter<String>(context,
android.R.layout.simple_spinner_item, ****);
(String[])areaNames1.values().toArray()我用的这个不行呀
谁能帮我ko啊。
Map<String, String> map = new HashMap<String, String>();
map.put("1", "1");
map.put("2", "2");
map.put("3", "3");
map.put("4", "4");
Collection<String> valueCollection = map.values();
final int size = valueCollection.size();
List<String> valueList = new ArrayList<String>(valueCollection);
String[] valueArray = new String[size];
map.values().toArray(valueArray);
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询