2010-10-12から1日間の記事一覧
static public <K, V> Map<K, ? extends List<V> > safePut(Map<K, ? extends List<V> > map, K key, V value) { List<V> list = map.get(key); if(list == null) { list = new ArrayList<V>(); map.put(key, list); // だめ // ↑The method put(K, capture#2-of ? extends List<V>) // in the type Map</v></v></v></k,></k,></k,>