Package io.github.dornol.excelkit.csv
Enum Class CsvQuoting
- All Implemented Interfaces:
Serializable,Comparable<CsvQuoting>,Constable
Quoting strategies for CSV field values.
CsvWriter.<Item>create()
.quoting(CsvQuoting.ALL)
.column("Name", Item::name)
.write(stream);
- Since:
- 0.9.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionQuote all fields unconditionally.Quote only when necessary — when the value contains the delimiter, quotes, or newlines.Quote fields that are not purely numeric. -
Method Summary
Modifier and TypeMethodDescriptionstatic CsvQuotingReturns the enum constant of this class with the specified name.static CsvQuoting[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MINIMAL
Quote only when necessary — when the value contains the delimiter, quotes, or newlines. This is the default behavior. -
ALL
Quote all fields unconditionally. -
NON_NUMERIC
Quote fields that are not purely numeric. Numeric values (integer and decimal) are left unquoted.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-