public static enum CsvSchema.ColumnType extends Enum<CsvSchema.ColumnType>
JsonToken
that column values are exposed as.Enum Constant and Description |
---|
ARRAY
Value will be a multi-value sequence, separated by array element
separator.
|
BOOLEAN
Value is expected to be a boolean ("true", "false") String,
or "null", or empty String (equivalent to null).
|
NUMBER
Value should be a number, but literals "null", "true" and "false"
are also understood, and an empty String is considered null.
|
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.
|
STRING
Default type if not explicitly defined; value will
be presented as
VALUE_STRING by parser,
that is, no type-inference is performed, and value is
not trimmed. |
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)
|
Modifier and Type | Method and Description |
---|---|
static CsvSchema.ColumnType |
valueOf(String name)
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.
|
public static final CsvSchema.ColumnType STRING
VALUE_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.
public static final CsvSchema.ColumnType STRING_OR_LITERAL
public static final CsvSchema.ColumnType NUMBER
public static final CsvSchema.ColumnType NUMBER_OR_STRING
public static final CsvSchema.ColumnType BOOLEAN
public static final CsvSchema.ColumnType ARRAY
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.
public static CsvSchema.ColumnType[] values()
for (CsvSchema.ColumnType c : CsvSchema.ColumnType.values()) System.out.println(c);
public static CsvSchema.ColumnType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2022 FasterXML. All rights reserved.