根据keys集合,返回一个新的Map
Map<K, V> filterFromKeys(List<K> keys) { Map<K, V> newMap = {}; for (K key in keys) { newMap[key] = this[key] as V; } return newMap; }