Search in sources :

Example 1 with DoubleNumberConverter

use of com.alibaba.excel.converters.doubleconverter.DoubleNumberConverter in project easyexcel by alibaba.

the class DefaultConverterLoader method initDefaultWriteConverter.

private static void initDefaultWriteConverter() {
    defaultWriteConverter = MapUtils.newHashMapWithExpectedSize(40);
    putWriteConverter(new BigDecimalNumberConverter());
    putWriteConverter(new BigIntegerNumberConverter());
    putWriteConverter(new BooleanBooleanConverter());
    putWriteConverter(new ByteNumberConverter());
    putWriteConverter(new DateDateConverter());
    putWriteConverter(new LocalDateTimeDateConverter());
    putWriteConverter(new DoubleNumberConverter());
    putWriteConverter(new FloatNumberConverter());
    putWriteConverter(new IntegerNumberConverter());
    putWriteConverter(new LongNumberConverter());
    putWriteConverter(new ShortNumberConverter());
    putWriteConverter(new StringStringConverter());
    putWriteConverter(new FileImageConverter());
    putWriteConverter(new InputStreamImageConverter());
    putWriteConverter(new ByteArrayImageConverter());
    putWriteConverter(new BoxingByteArrayImageConverter());
    putWriteConverter(new UrlImageConverter());
    // In some cases, it must be converted to string
    putWriteStringConverter(new BigDecimalStringConverter());
    putWriteStringConverter(new BigIntegerStringConverter());
    putWriteStringConverter(new BooleanStringConverter());
    putWriteStringConverter(new ByteStringConverter());
    putWriteStringConverter(new DateStringConverter());
    putWriteStringConverter(new LocalDateTimeStringConverter());
    putWriteStringConverter(new DoubleStringConverter());
    putWriteStringConverter(new FloatStringConverter());
    putWriteStringConverter(new IntegerStringConverter());
    putWriteStringConverter(new LongStringConverter());
    putWriteStringConverter(new ShortStringConverter());
    putWriteStringConverter(new StringStringConverter());
    putWriteStringConverter(new BigIntegerStringConverter());
}
Also used : DateDateConverter(com.alibaba.excel.converters.date.DateDateConverter) IntegerNumberConverter(com.alibaba.excel.converters.integer.IntegerNumberConverter) BigIntegerNumberConverter(com.alibaba.excel.converters.biginteger.BigIntegerNumberConverter) IntegerStringConverter(com.alibaba.excel.converters.integer.IntegerStringConverter) BigIntegerStringConverter(com.alibaba.excel.converters.biginteger.BigIntegerStringConverter) StringStringConverter(com.alibaba.excel.converters.string.StringStringConverter) BoxingByteArrayImageConverter(com.alibaba.excel.converters.bytearray.BoxingByteArrayImageConverter) BooleanStringConverter(com.alibaba.excel.converters.booleanconverter.BooleanStringConverter) BigDecimalStringConverter(com.alibaba.excel.converters.bigdecimal.BigDecimalStringConverter) LongStringConverter(com.alibaba.excel.converters.longconverter.LongStringConverter) BigIntegerNumberConverter(com.alibaba.excel.converters.biginteger.BigIntegerNumberConverter) LongNumberConverter(com.alibaba.excel.converters.longconverter.LongNumberConverter) BigIntegerStringConverter(com.alibaba.excel.converters.biginteger.BigIntegerStringConverter) FloatNumberConverter(com.alibaba.excel.converters.floatconverter.FloatNumberConverter) FileImageConverter(com.alibaba.excel.converters.file.FileImageConverter) BoxingByteArrayImageConverter(com.alibaba.excel.converters.bytearray.BoxingByteArrayImageConverter) ByteArrayImageConverter(com.alibaba.excel.converters.bytearray.ByteArrayImageConverter) DoubleStringConverter(com.alibaba.excel.converters.doubleconverter.DoubleStringConverter) ShortStringConverter(com.alibaba.excel.converters.shortconverter.ShortStringConverter) ShortNumberConverter(com.alibaba.excel.converters.shortconverter.ShortNumberConverter) DoubleNumberConverter(com.alibaba.excel.converters.doubleconverter.DoubleNumberConverter) LocalDateTimeDateConverter(com.alibaba.excel.converters.localdatetime.LocalDateTimeDateConverter) ByteStringConverter(com.alibaba.excel.converters.byteconverter.ByteStringConverter) UrlImageConverter(com.alibaba.excel.converters.url.UrlImageConverter) FloatStringConverter(com.alibaba.excel.converters.floatconverter.FloatStringConverter) BooleanBooleanConverter(com.alibaba.excel.converters.booleanconverter.BooleanBooleanConverter) DateStringConverter(com.alibaba.excel.converters.date.DateStringConverter) InputStreamImageConverter(com.alibaba.excel.converters.inputstream.InputStreamImageConverter) BigDecimalNumberConverter(com.alibaba.excel.converters.bigdecimal.BigDecimalNumberConverter) ByteNumberConverter(com.alibaba.excel.converters.byteconverter.ByteNumberConverter) LocalDateTimeStringConverter(com.alibaba.excel.converters.localdatetime.LocalDateTimeStringConverter)

Example 2 with DoubleNumberConverter

use of com.alibaba.excel.converters.doubleconverter.DoubleNumberConverter in project easyexcel by alibaba.

the class DefaultConverterLoader method initAllConverter.

private static void initAllConverter() {
    allConverter = MapUtils.newHashMapWithExpectedSize(40);
    putAllConverter(new BigDecimalBooleanConverter());
    putAllConverter(new BigDecimalNumberConverter());
    putAllConverter(new BigDecimalStringConverter());
    putAllConverter(new BigIntegerBooleanConverter());
    putAllConverter(new BigIntegerNumberConverter());
    putAllConverter(new BigIntegerStringConverter());
    putAllConverter(new BooleanBooleanConverter());
    putAllConverter(new BooleanNumberConverter());
    putAllConverter(new BooleanStringConverter());
    putAllConverter(new ByteBooleanConverter());
    putAllConverter(new ByteNumberConverter());
    putAllConverter(new ByteStringConverter());
    putAllConverter(new DateNumberConverter());
    putAllConverter(new DateStringConverter());
    putAllConverter(new LocalDateNumberConverter());
    putAllConverter(new LocalDateTimeStringConverter());
    putAllConverter(new DoubleBooleanConverter());
    putAllConverter(new DoubleNumberConverter());
    putAllConverter(new DoubleStringConverter());
    putAllConverter(new FloatBooleanConverter());
    putAllConverter(new FloatNumberConverter());
    putAllConverter(new FloatStringConverter());
    putAllConverter(new IntegerBooleanConverter());
    putAllConverter(new IntegerNumberConverter());
    putAllConverter(new IntegerStringConverter());
    putAllConverter(new LongBooleanConverter());
    putAllConverter(new LongNumberConverter());
    putAllConverter(new LongStringConverter());
    putAllConverter(new ShortBooleanConverter());
    putAllConverter(new ShortNumberConverter());
    putAllConverter(new ShortStringConverter());
    putAllConverter(new StringBooleanConverter());
    putAllConverter(new StringNumberConverter());
    putAllConverter(new StringStringConverter());
    putAllConverter(new StringErrorConverter());
    putAllConverter(new BigIntegerStringConverter());
}
Also used : IntegerNumberConverter(com.alibaba.excel.converters.integer.IntegerNumberConverter) BigIntegerNumberConverter(com.alibaba.excel.converters.biginteger.BigIntegerNumberConverter) DoubleBooleanConverter(com.alibaba.excel.converters.doubleconverter.DoubleBooleanConverter) BigDecimalBooleanConverter(com.alibaba.excel.converters.bigdecimal.BigDecimalBooleanConverter) IntegerStringConverter(com.alibaba.excel.converters.integer.IntegerStringConverter) BigIntegerStringConverter(com.alibaba.excel.converters.biginteger.BigIntegerStringConverter) StringStringConverter(com.alibaba.excel.converters.string.StringStringConverter) BigIntegerBooleanConverter(com.alibaba.excel.converters.biginteger.BigIntegerBooleanConverter) IntegerBooleanConverter(com.alibaba.excel.converters.integer.IntegerBooleanConverter) BooleanNumberConverter(com.alibaba.excel.converters.booleanconverter.BooleanNumberConverter) BooleanStringConverter(com.alibaba.excel.converters.booleanconverter.BooleanStringConverter) StringBooleanConverter(com.alibaba.excel.converters.string.StringBooleanConverter) BigDecimalStringConverter(com.alibaba.excel.converters.bigdecimal.BigDecimalStringConverter) LongStringConverter(com.alibaba.excel.converters.longconverter.LongStringConverter) BigIntegerNumberConverter(com.alibaba.excel.converters.biginteger.BigIntegerNumberConverter) BigIntegerStringConverter(com.alibaba.excel.converters.biginteger.BigIntegerStringConverter) LongNumberConverter(com.alibaba.excel.converters.longconverter.LongNumberConverter) ByteBooleanConverter(com.alibaba.excel.converters.byteconverter.ByteBooleanConverter) FloatNumberConverter(com.alibaba.excel.converters.floatconverter.FloatNumberConverter) LongBooleanConverter(com.alibaba.excel.converters.longconverter.LongBooleanConverter) DoubleStringConverter(com.alibaba.excel.converters.doubleconverter.DoubleStringConverter) ShortStringConverter(com.alibaba.excel.converters.shortconverter.ShortStringConverter) ShortNumberConverter(com.alibaba.excel.converters.shortconverter.ShortNumberConverter) DoubleNumberConverter(com.alibaba.excel.converters.doubleconverter.DoubleNumberConverter) BigIntegerBooleanConverter(com.alibaba.excel.converters.biginteger.BigIntegerBooleanConverter) ShortBooleanConverter(com.alibaba.excel.converters.shortconverter.ShortBooleanConverter) ByteStringConverter(com.alibaba.excel.converters.byteconverter.ByteStringConverter) FloatStringConverter(com.alibaba.excel.converters.floatconverter.FloatStringConverter) BooleanBooleanConverter(com.alibaba.excel.converters.booleanconverter.BooleanBooleanConverter) DateStringConverter(com.alibaba.excel.converters.date.DateStringConverter) DateNumberConverter(com.alibaba.excel.converters.date.DateNumberConverter) LocalDateNumberConverter(com.alibaba.excel.converters.localdatetime.LocalDateNumberConverter) StringErrorConverter(com.alibaba.excel.converters.string.StringErrorConverter) BigDecimalNumberConverter(com.alibaba.excel.converters.bigdecimal.BigDecimalNumberConverter) FloatBooleanConverter(com.alibaba.excel.converters.floatconverter.FloatBooleanConverter) StringNumberConverter(com.alibaba.excel.converters.string.StringNumberConverter) LocalDateNumberConverter(com.alibaba.excel.converters.localdatetime.LocalDateNumberConverter) ByteNumberConverter(com.alibaba.excel.converters.byteconverter.ByteNumberConverter) LocalDateTimeStringConverter(com.alibaba.excel.converters.localdatetime.LocalDateTimeStringConverter)

Aggregations

BigDecimalNumberConverter (com.alibaba.excel.converters.bigdecimal.BigDecimalNumberConverter)2 BigDecimalStringConverter (com.alibaba.excel.converters.bigdecimal.BigDecimalStringConverter)2 BigIntegerNumberConverter (com.alibaba.excel.converters.biginteger.BigIntegerNumberConverter)2 BigIntegerStringConverter (com.alibaba.excel.converters.biginteger.BigIntegerStringConverter)2 BooleanBooleanConverter (com.alibaba.excel.converters.booleanconverter.BooleanBooleanConverter)2 BooleanStringConverter (com.alibaba.excel.converters.booleanconverter.BooleanStringConverter)2 ByteNumberConverter (com.alibaba.excel.converters.byteconverter.ByteNumberConverter)2 ByteStringConverter (com.alibaba.excel.converters.byteconverter.ByteStringConverter)2 DateStringConverter (com.alibaba.excel.converters.date.DateStringConverter)2 DoubleNumberConverter (com.alibaba.excel.converters.doubleconverter.DoubleNumberConverter)2 DoubleStringConverter (com.alibaba.excel.converters.doubleconverter.DoubleStringConverter)2 FloatNumberConverter (com.alibaba.excel.converters.floatconverter.FloatNumberConverter)2 FloatStringConverter (com.alibaba.excel.converters.floatconverter.FloatStringConverter)2 IntegerNumberConverter (com.alibaba.excel.converters.integer.IntegerNumberConverter)2 IntegerStringConverter (com.alibaba.excel.converters.integer.IntegerStringConverter)2 LocalDateTimeStringConverter (com.alibaba.excel.converters.localdatetime.LocalDateTimeStringConverter)2 LongNumberConverter (com.alibaba.excel.converters.longconverter.LongNumberConverter)2 LongStringConverter (com.alibaba.excel.converters.longconverter.LongStringConverter)2 ShortNumberConverter (com.alibaba.excel.converters.shortconverter.ShortNumberConverter)2 ShortStringConverter (com.alibaba.excel.converters.shortconverter.ShortStringConverter)2