Enum CsvSchema.ColumnType
- All Implemented Interfaces:
Serializable
,Comparable<CsvSchema.ColumnType>
,java.lang.constant.Constable
- Enclosing class:
CsvSchema
Enumeration that defines optional type indicators that can be passed
with schema. If used type is used to determine type of
JsonToken
that column values are exposed as.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionValue will be a multi-value sequence, separated by array element separator.Value is expected to be a boolean ("true", "false") String, or "null", or empty String (equivalent to null).Value should be a number, but literals "null", "true" and "false" are also understood, and an empty String is considered null.Value is taken to be a number (if it matches valid JSON number formatting rules), literal (null, true or false) or String, depending on best match.Default type if not explicitly defined; value will be presented asVALUE_STRING
by parser, that is, no type-inference is performed, and value is not trimmed.Value is considered to be a String, except that tokens "null", "true" and "false" are recognized as matching tokens and reported as such; and values are trimmed (leading/trailing white space) -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CsvSchema.ColumnType
Returns the enum constant of this type with the specified name.static CsvSchema.ColumnType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
STRING
Default type if not explicitly defined; value will be presented asVALUE_STRING
by parser, that is, no type-inference is performed, and value is not trimmed.Note that this type allows coercion into array, if higher level application calls
JsonParser.isExpectedStartArrayToken()
, unlike more explicit types. -
STRING_OR_LITERAL
Value is considered to be a String, except that tokens "null", "true" and "false" are recognized as matching tokens and reported as such; and values are trimmed (leading/trailing white space) -
NUMBER
Value should be a number, but literals "null", "true" and "false" are also understood, and an empty String is considered null. Values are also trimmed (leading/trailing white space) Other non-numeric Strings may cause parsing exception. -
NUMBER_OR_STRING
Value is taken to be a number (if it matches valid JSON number formatting rules), literal (null, true or false) or String, depending on best match. Values are also trimmed (leading/trailing white space) -
BOOLEAN
Value is expected to be a boolean ("true", "false") String, or "null", or empty String (equivalent to null). Values are trimmed (leading/trailing white space). Values other than indicated above may result in an exception.- Since:
- 2.5
-
ARRAY
Value will be a multi-value sequence, separated by array element separator. Element type itself may be any scalar type (that is, number or String) and will not be optimized. Separator may be overridden on per-column basis.Note that this type is used for generic concept of multiple values, and not specifically to match Java arrays: data-binding may match such columns to
Collection
s as well, or even other types as necessary.- Since:
- 2.5
-
-
Constructor Details
-
ColumnType
private ColumnType()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-