类 ConvertUtils

java.lang.Object
com.cdkjframework.util.tool.number.ConvertUtils

@Component public class ConvertUtils extends Object
  • 构造器详细资料

    • ConvertUtils

      public ConvertUtils()
  • 方法详细资料

    • convertInt

      public static int convertInt(Object obj)
      将值转换为整数
      参数:
      obj - 值
      返回:
      返回结果
    • convertFloat

      public static Float convertFloat(Object obj)
      将值转换为浮动
      参数:
      obj - 值
      返回:
      返回结果
    • convertDouble

      public static Double convertDouble(Object obj)
      将值转换为双精度
      参数:
      obj - 值
      返回:
      返回结果
    • convertDecimal

      public static BigDecimal convertDecimal(Object obj)
      将值转换为大十进制
      参数:
      obj - 值
      返回:
      返回结果
    • convertLong

      public static Long convertLong(Object obj)
      转换为长整形
      参数:
      obj - 数据
      返回:
      返回结果
    • convertBoolean

      public static Boolean convertBoolean(Object obj)
      将值转换为布尔
      参数:
      obj - 值
      返回:
      返回结果
    • convertString

      public static String convertString(Object obj)
      转换为字段串类型
      参数:
      obj - 数据
      返回:
      返回结果