public interface Map
java.util.Map<K, V>
public class HashMap
extends AbstractMap<K, V> implements Map<K, V>, Cloneable, Serializable
java.lang.Object
↳ java.util.AbstractMap<K, V>
↳ java.util.HashMap<K, V>
// e.g.
Map(key,value) : (이름, 홍길동), (나이, 26), (성별, 남자)
// e.g.
private Map<Integer, List<BaseMenuItem>> mMap = new HashMap<Integer,List<BaseMenuItem>>();
private Map<Integer, List<BaseMenuItem>> mMap2 = new HashMap<>(); // :파라미터 생략
private Map<Integer, List<BaseMenuItem>> mMap3 = new HashMap<>(mMap); // :mMap의 모든 값을 가진 HashMap
private Map<Integer, List<BaseMenuItem>> mMap4 = new HashMap<>(10); // :용량 지정
private Map<Integer, List<BaseMenuItem>> mMap5 = new HashMap<String, int>() { // :default값 지정
put("숫자", 8)
};
List<BaseMenuItem> baseMenuItemsList = new ArrayList<>();
mMap.put(Integer.valueOf(intValue), baseMenuItemsList);
mMap5.remove("숫자"); // key가 "숫자"인 값 제거
mMap.clear(); // mMap HashMap 모두 제거
https://developer.android.com/reference/java/util/Map
https://developer.android.com/reference/java/util/HashMap