Enum CsvFieldType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<CsvFieldType>

    enum CsvFieldType
    extends java.lang.Enum<CsvFieldType>
    Type of a field in a CSV file.

    Usually, and unless specified explicitly in the header row, a field is of type STRING. But specifying the field type in the header row makes it easier to write SQL.

    • Field Detail

      • clazz

        private final java.lang.Class clazz
      • simpleName

        private final java.lang.String simpleName
      • MAP

        private static final java.util.Map<java.lang.String,​CsvFieldType> MAP
    • Constructor Detail

      • CsvFieldType

        private CsvFieldType​(Primitive primitive)
      • CsvFieldType

        private CsvFieldType​(java.lang.Class clazz,
                             java.lang.String simpleName)
    • Method Detail

      • values

        public static CsvFieldType[] 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 (CsvFieldType c : CsvFieldType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CsvFieldType 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
      • of

        public static CsvFieldType of​(java.lang.String typeString)