com.fasterxml.jackson.dataformat.csv
Enum CsvParser.Feature

java.lang.Object
  extended by java.lang.Enum<CsvParser.Feature>
      extended by com.fasterxml.jackson.dataformat.csv.CsvParser.Feature
All Implemented Interfaces:
Serializable, Comparable<CsvParser.Feature>
Enclosing class:
CsvParser

public static enum CsvParser.Feature
extends Enum<CsvParser.Feature>

Enumeration that defines all togglable features for Smile generators.


Enum Constant Summary
TRIM_SPACES
          Feature determines whether spaces around separator characters (commas) are to be automatically trimmed before being reported or not.
WRAP_AS_ARRAY
          Feature that determines how stream of records (usually CSV lines, but sometimes multiple lines when linefeeds are included in quoted values) is exposed: either as a sequence of Objects (false), or as an array of Objects (true).
 
Method Summary
static int collectDefaults()
          Method that calculates bit set (flags) of all features that are enabled by default.
 boolean enabledByDefault()
           
 int getMask()
           
static CsvParser.Feature valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CsvParser.Feature[] 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
 

Enum Constant Detail

TRIM_SPACES

public static final CsvParser.Feature TRIM_SPACES
Feature determines whether spaces around separator characters (commas) are to be automatically trimmed before being reported or not. Note that this does NOT force trimming of possible white space from within double-quoted values, but only those surrounding unquoted values (white space outside of double-quotes is never included regardless of trimming).

Default value is false, as per RFC-4180.


WRAP_AS_ARRAY

public static final CsvParser.Feature WRAP_AS_ARRAY
Feature that determines how stream of records (usually CSV lines, but sometimes multiple lines when linefeeds are included in quoted values) is exposed: either as a sequence of Objects (false), or as an array of Objects (true). Using stream of Objects is convenient when using ObjectMapper.readValues(...) and array of Objects convenient when binding to Lists or arrays of values.

Default value is false, meaning that by default a CSV document is exposed as a sequence of root-level Object entries.

Method Detail

values

public static CsvParser.Feature[] 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 (CsvParser.Feature c : CsvParser.Feature.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CsvParser.Feature valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

collectDefaults

public static int collectDefaults()
Method that calculates bit set (flags) of all features that are enabled by default.


enabledByDefault

public boolean enabledByDefault()

getMask

public int getMask()


Copyright © 2012 fasterxml.com. All Rights Reserved.