public class MapTool extends Object
| 构造器和说明 |
|---|
MapTool() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <K,T> List<T> |
extract(List<Map<K,T>> mapList,
K key)
抽取Map列表中的key值数据列表
|
static <K,T> T |
get(Map<K,T> map,
K key,
T defaultValue) |
static <K,T> boolean |
getBoolean(Map<K,T> map,
K key,
T defaultValue) |
static <K,T> double |
getDouble(Map<K,T> map,
K key,
T defaultValue) |
static <K,T> int |
getInt(Map<K,T> map,
K key,
T defaultValue) |
static <K,T> LocalDateTime |
getLocalDateTime(Map<K,T> map,
K key,
T defaultValue) |
static <K,T> long |
getLong(Map<K,T> map,
K key,
T defaultValue) |
static <K,T> String |
getString(Map<K,T> map,
K key,
T defaultValue) |
static boolean |
ok(Map map)
判断 Map 存在至少一个元素
|
static boolean |
ok(Map map,
String... keys)
判断 Map 中存在指定 Keys,且指定的 Keys 值不为 Null
|
static void |
print(Map map) |
public static boolean ok(Map map)
map - 参数public static boolean ok(Map map, String... keys)
map - 参数keys - 参数public static <K,T> T get(Map<K,T> map, K key, T defaultValue)
public static <K,T> int getInt(Map<K,T> map, K key, T defaultValue)
public static <K,T> long getLong(Map<K,T> map, K key, T defaultValue)
public static <K,T> double getDouble(Map<K,T> map, K key, T defaultValue)
public static <K,T> boolean getBoolean(Map<K,T> map, K key, T defaultValue)
public static <K,T> LocalDateTime getLocalDateTime(Map<K,T> map, K key, T defaultValue)
public static <K,T> List<T> extract(List<Map<K,T>> mapList, K key)
K - 参数T - 参数mapList - 参数key - 参数public static void print(Map map)
Copyright © 2024. All rights reserved.