fix meta bug

This commit is contained in:
Looly
2019-11-01 10:23:25 +08:00
parent 29153dc0db
commit b737c97947
4 changed files with 88 additions and 61 deletions

View File

@@ -818,6 +818,24 @@ public class MapUtil {
return filter(map, (Filter<Entry<K, V>>) entry -> ArrayUtil.contains(keys, entry.getKey()));
}
/**
* 去掉Map中指定key的键值对修改原Map
*
* @param <K> Key类型
* @param <V> Value类型
* @param map Map
* @param keys 键列表
* @return 修改后的key
* @since 5.0.5
*/
@SuppressWarnings("unchecked")
public static <K, V> Map<K, V> removeAny(Map<K, V> map, final K... keys) {
for (K key : keys) {
map.remove(key);
}
return map;
}
/**
* 获取Map指定key的值并转换为字符串
*