Enum LocalDateStringConverter

  • All Implemented Interfaces:
    com.alibaba.excel.converters.Converter<java.time.LocalDate>, java.io.Serializable, java.lang.Comparable<LocalDateStringConverter>

    public enum LocalDateStringConverter
    extends java.lang.Enum<LocalDateStringConverter>
    implements com.alibaba.excel.converters.Converter<java.time.LocalDate>
    LocalDate and string converter
    Author:
    L.cm
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      INSTANCE
      实例
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.alibaba.excel.metadata.data.WriteCellData<java.lang.String> convertToExcelData​(java.time.LocalDate value, com.alibaba.excel.metadata.property.ExcelContentProperty contentProperty, com.alibaba.excel.metadata.GlobalConfiguration globalConfiguration)  
      java.time.LocalDate convertToJavaData​(com.alibaba.excel.metadata.data.ReadCellData cellData, com.alibaba.excel.metadata.property.ExcelContentProperty contentProperty, com.alibaba.excel.metadata.GlobalConfiguration globalConfiguration)  
      com.alibaba.excel.enums.CellDataTypeEnum supportExcelTypeKey()  
      java.lang.Class supportJavaTypeKey()  
      static LocalDateStringConverter valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static LocalDateStringConverter[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.alibaba.excel.converters.Converter

        convertToExcelData, convertToJavaData
    • Constructor Detail

      • LocalDateStringConverter

        private LocalDateStringConverter()
    • Method Detail

      • values

        public static LocalDateStringConverter[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LocalDateStringConverter c : LocalDateStringConverter.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LocalDateStringConverter valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • supportJavaTypeKey

        public java.lang.Class supportJavaTypeKey()
        Specified by:
        supportJavaTypeKey in interface com.alibaba.excel.converters.Converter<java.time.LocalDate>
      • supportExcelTypeKey

        public com.alibaba.excel.enums.CellDataTypeEnum supportExcelTypeKey()
        Specified by:
        supportExcelTypeKey in interface com.alibaba.excel.converters.Converter<java.time.LocalDate>
      • convertToJavaData

        public java.time.LocalDate convertToJavaData​(com.alibaba.excel.metadata.data.ReadCellData cellData,
                                                     com.alibaba.excel.metadata.property.ExcelContentProperty contentProperty,
                                                     com.alibaba.excel.metadata.GlobalConfiguration globalConfiguration)
                                              throws java.text.ParseException
        Specified by:
        convertToJavaData in interface com.alibaba.excel.converters.Converter<java.time.LocalDate>
        Throws:
        java.text.ParseException
      • convertToExcelData

        public com.alibaba.excel.metadata.data.WriteCellData<java.lang.String> convertToExcelData​(java.time.LocalDate value,
                                                                                                  com.alibaba.excel.metadata.property.ExcelContentProperty contentProperty,
                                                                                                  com.alibaba.excel.metadata.GlobalConfiguration globalConfiguration)
        Specified by:
        convertToExcelData in interface com.alibaba.excel.converters.Converter<java.time.LocalDate>