类 ObjectConvertExtension

java.lang.Object
org.ssssssss.script.functions.ObjectConvertExtension

public class ObjectConvertExtension extends Object
类型转换
  • 构造器详细资料

    • ObjectConvertExtension

      public ObjectConvertExtension()
  • 方法详细资料

    • asInt

      @Comment("\u5c06\u503c\u8f6c\u6362\u4e3aint\u7c7b\u578b") public static int asInt(Object val, @Comment(name="defaultValue",value="\u8f6c\u6362\u5931\u8d25\u65f6\u7684\u9ed8\u8ba4\u503c") int defaultValue)
      转int
      参数:
      defaultValue - 默认值
    • asDouble

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3adouble\u7c7b\u578b") public static double asDouble(Object val, @Comment(name="defaultValue",value="\u8f6c\u6362\u5931\u8d25\u65f6\u7684\u9ed8\u8ba4\u503c") double defaultValue)
      转double
      参数:
      defaultValue - 默认值
    • asLong

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3along\u7c7b\u578b") public static long asLong(Object val, @Comment(name="defaultValue",value="\u8f6c\u6362\u5931\u8d25\u65f6\u7684\u9ed8\u8ba4\u503c") long defaultValue)
      转long
      参数:
      defaultValue - 默认值
    • asString

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3aString\u7c7b\u578b") public static String asString(Object val)
      转String
    • asDate

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3aDate\u7c7b\u578b\uff0c\u9ed8\u8ba4\u5b57\u7b26\u4e32\u683c\u5f0f\u4e3ayyyy-MM-dd HH:mm:ss") public static Date asDate(Object val)
      转Date
    • asDecimal

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3aBigDecimal\u7c7b\u578b") public static BigDecimal asDecimal(Object val)
      转BigDecimal
    • asDecimal

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3aBigDecimal\u7c7b\u578b") public static BigDecimal asDecimal(Object val, @Comment(name="defaultVal",value="\u8f6c\u6362\u5931\u8d25\u65f6\u7684\u9ed8\u8ba4\u503c") BigDecimal defaultVal)
      转BigDecimal
    • asDate

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3aDate\u7c7b\u578b,\u652f\u6301String\u300110\u4f4d\u300113\u4f4d\u65f6\u95f4\u6233") public static Date asDate(Object val, @Comment(name="format",value="\u65e5\u671f\u683c\u5f0f\uff0c\u5982yyyy-MM-dd HH:mm:ss") String format)
      转Date
    • asString

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3aString\u7c7b\u578b") public static String asString(Object val, @Comment(name="defaultValue",value="\u8f6c\u6362\u5931\u8d25\u65f6\u7684\u9ed8\u8ba4\u503c") String defaultValue)
      转String
      参数:
      defaultValue - 默认值
    • asInt

      @Comment("\u5c06\u503c\u8f6c\u6362\u4e3aint\u7c7b\u578b\uff0c\u8f6c\u6362\u5931\u8d25\u65f6\u4e3a0") public int asInt(Object val)
      转int
    • asDouble

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3adouble\u7c7b\u578b\uff0c\u8f6c\u6362\u5931\u8d25\u65f6\u4e3a0.0") public double asDouble(Object val)
      转double
    • asLong

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3along\u7c7b\u578b\uff0c\u8f6c\u6362\u5931\u8d25\u65f6\u4e3a0L") public long asLong(Object val)
      转long
    • asByte

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3abyte\u7c7b\u578b\uff0c\u8f6c\u6362\u5931\u8d25\u65f6\u9ed8\u8ba4\u4e3a0") public byte asByte(Object val)
      转byte
    • asByte

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3abyte\u7c7b\u578b") public byte asByte(Object val, @Comment(name="defaultValue",value="\u8f6c\u6362\u5931\u8d25\u65f6\u7684\u9ed8\u8ba4\u503c") byte defaultValue)
      转byte
      参数:
      defaultValue - 默认值
    • asShort

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3ashort\u7c7b\u578b\uff0c\u8f6c\u6362\u5931\u8d25\u65f6\u9ed8\u8ba4\u4e3a0") public short asShort(Object val)
      转short
    • asShort

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3ashort\u7c7b\u578b") public short asShort(Object val, @Comment(name="defaultValue",value="\u8f6c\u6362\u5931\u8d25\u65f6\u7684\u9ed8\u8ba4\u503c") short defaultValue)
      转short
      参数:
      defaultValue - 默认值
    • asFloat

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3afloat\u7c7b\u578b\uff0c\u8f6c\u6362\u5931\u8d25\u9ed8\u8ba4\u4e3a0.0f") public float asFloat(Object val)
      转float
    • asFloat

      @Comment("\u5c06\u5bf9\u8c61\u8f6c\u4e3afloat\u7c7b\u578b") public float asFloat(Object val, @Comment(name="defaultValue",value="\u8f6c\u6362\u5931\u8d25\u65f6\u7684\u9ed8\u8ba4\u503c") float defaultValue)
      转float
      参数:
      defaultValue - 默认值