Package org.miaixz.bus.core.convert
Class PairConverter
java.lang.Object
org.miaixz.bus.core.convert.PairConverter
- All Implemented Interfaces:
Converter
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Details
-
INSTANCE
单例
-
-
Constructor Details
-
PairConverter
public PairConverter()
-
-
Method Details
-
convert
Description copied from interface:Converter转换为指定类型 如果类型无法确定,将读取默认值的类型做为目标类型- Specified by:
convertin interfaceConverter- Parameters:
targetType- 目标Type,非泛型类使用value- 原始值,如果对象实现了此接口,则value为this- Returns:
- 转换后的值
- Throws:
ConvertException- 转换无法正常完成或转换异常时抛出此异常
-
convert
转换对象为指定键值类型的指定类型Map- Parameters:
leftType- 键类型rightType- 值类型value- 被转换的值- Returns:
- 转换后的Map
- Throws:
ConvertException- 转换异常或不支持的类型
-