All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.hutool.core.convert.Converter Maven / Gradle / Ivy

There is a newer version: 1.0.13.10
Show newest version
package com.dahuatech.hutool.core.convert;

/**
 * 转换器接口,实现类型转换
 *
 * @param  转换到的目标类型
 * @author Looly
 */
public interface Converter {

  /**
   * 转换为指定类型
* 如果类型无法确定,将读取默认值的类型做为目标类型 * * @param value 原始值 * @param defaultValue 默认值 * @return 转换后的值 * @throws IllegalArgumentException 无法确定目标类型,且默认值为{@code null},无法确定类型 */ T convert(Object value, T defaultValue) throws IllegalArgumentException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy