类 CompatibleTypeUtils


  • public class CompatibleTypeUtils
    extends 
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static  value, <?> type)
      Compatible type convert.
      • 从类继承的方法 java.lang.

        , , , , , , , ,
    • 方法详细资料

      • compatibleTypeConvert

        public static  compatibleTypeConvert​( value,
                                                   <?> type)
        Compatible type convert. Null value is allowed to pass in. If no conversion is needed, then the original value will be returned.

        Supported compatible type conversions include (primary types and corresponding wrappers are not listed):

        • String -> char, enum, Date
        • byte, short, int, long -> byte, short, int, long
        • float, double -> float, double