Android examples for java.util:Map
Convert map To List
//package com.book2s; import java.util.ArrayList; import java.util.List; import java.util.Map; public class Main { public static <E> List<E> mapToList(String[] keys, Map<String, E> map) { List<E> list = new ArrayList<E>(keys.length); for (int i = 0; i < keys.length; i++) { list.add(map.get(keys[i]));//from ww w . jav a 2s .c o m } return list; } }