Package org.miaixz.bus.core.center.map
Class MapValidator
java.lang.Object
org.miaixz.bus.core.center.map.MapValidator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> Map <K, V> emptyIfNull(Map<K, V> set) 如果提供的集合为null,返回一个不可变的默认空集合,否则返回原集合 空集合使用Collections.emptyMap()static booleanMap是否为空static booleanisNotEmpty(Map<?, ?> map) Map是否为非空
-
Constructor Details
-
MapValidator
public MapValidator()
-
-
Method Details
-
isEmpty
-
isNotEmpty
-
emptyIfNull
如果提供的集合为null,返回一个不可变的默认空集合,否则返回原集合 空集合使用Collections.emptyMap()- Type Parameters:
K- 键类型V- 值类型- Parameters:
set- 提供的集合,可能为null- Returns:
- 原集合,若为null返回空集合
-