public class MapUtils extends Object
| 构造器和说明 |
|---|
MapUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Object |
computeIfAbsent(Map target,
Object key,
BiFunction mappingFunction,
Object param1,
Object param2)
ComputeIfAbsent lazy load.
|
static boolean |
isEmpty(Dictionary coll)
Null-safe check if the specified Dictionary is empty.
|
static boolean |
isEmpty(Map map)
Null-safe check if the specified Dictionary is empty.
|
static boolean |
isNotEmpty(Dictionary coll)
Null-safe check if the specified Dictionary is not empty.
|
static boolean |
isNotEmpty(Map map)
Null-safe check if the specified Dictionary is not empty.
|
static void |
putIfValNoEmpty(Map target,
Object key,
Object value)
Put into map if value is not empty.
|
static void |
putIfValNoNull(Map target,
Object key,
Object value)
Put into map if value is not null.
|
public static boolean isEmpty(Map map)
Null returns true.
map - the collection to check, may be nullpublic static boolean isEmpty(Dictionary coll)
Null returns true.
coll - the collection to check, may be nullpublic static boolean isNotEmpty(Map map)
Null returns false.
map - the collection to check, may be nullpublic static boolean isNotEmpty(Dictionary coll)
Null returns false.
coll - the collection to check, may be nullpublic static void putIfValNoNull(Map target, Object key, Object value)
target - target mapkey - keyvalue - valuepublic static void putIfValNoEmpty(Map target, Object key, Object value)
target - target mapkey - keyvalue - value@NotThreadSafe public static Object computeIfAbsent(Map target, Object key, BiFunction mappingFunction, Object param1, Object param2)
target - target Map data.key - map key.mappingFunction - function which is need to be executed.param1 - function's parameter value1.param2 - function's parameter value1.Copyright © 2018–2021 Alibaba Group. All rights reserved.