| Package | Description |
|---|---|
| org.dromara.hutool.core.convert |
万能类型转换器以及各种类型转换的实现类,其中Convert为转换器入口,提供各种toXXX方法和convert方法
转换器是典型的策略模式应用,可自定义转换策略。 |
| org.dromara.hutool.core.map |
Map相关封装,提供特殊Map实现以及Map工具MapUtil
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
ConvertUtil.convert(TypeReference<T> reference,
Object value)
转换值为指定类型
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
MapGetUtil.get(Map<?,?> map,
Object key,
TypeReference<T> type)
获取Map指定key的值,并转换为指定类型
|
static <T> T |
MapGetUtil.get(Map<?,?> map,
Object key,
TypeReference<T> type,
T defaultValue)
获取Map指定key的值,并转换为指定类型
|
static <T> T |
MapGetUtil.getQuietly(Map<?,?> map,
Object key,
TypeReference<T> type,
T defaultValue)
获取Map指定key的值,并转换为指定类型,转换失败后返回null,不抛异常
|
Copyright © 2024. All rights reserved.