Top Inners Fields Constructors Methods
org.junit.jupiter.params.provider

pack-priv Class CsvReaderFactory

extends Object
Class Inheritance
Static Imports
de.siegmar.fastcsv.reader.CommentStrategy.NONE, .CommentStrategy.SKIP

Since
6.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static record

Field Summary

Modifier and TypeField and Description
private static final boolean
private static final boolean
private static final boolean
private static final String
private static final char
private static final int
private static final int
private static final boolean
private static final boolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static CsvCallbackHandler<? extends CsvRecord>
createCallbackHandler(String emptyValue, Set<String> nullValues, boolean ignoreLeadingAndTrailingWhitespaces, int maxCharsPerColumn, boolean useHeadersInDisplayName)

pack-priv static CsvReader<? extends CsvRecord>
createReaderFor(CsvSource csvSource, String data)

pack-priv static CsvReader<? extends CsvRecord>
createReaderFor(CsvFileSource csvFileSource, InputStream inputStream, Charset charset)

private static String
selectDelimiter(char delimiter, String delimiterString)

private static boolean
pack-priv static void
validate(CsvSource csvSource)

pack-priv static void
validate(CsvFileSource csvFileSource)

private static void
validateControlCharactersDiffer(String delimiter, char quoteCharacter, char commentCharacter, CommentStrategy commentStrategy)

private static void
validateDelimiter(char delimiter, String delimiterString, Annotation annotation)

private static void
validateMaxCharsPerColumn(int maxCharsPerColumn)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALLOW_DUPLICATE_HEADER_FIELDSback to summary
private static final boolean ALLOW_DUPLICATE_HEADER_FIELDS
ALLOW_EXTRA_FIELDSback to summary
private static final boolean ALLOW_EXTRA_FIELDS
ALLOW_MISSING_FIELDSback to summary
private static final boolean ALLOW_MISSING_FIELDS
DEFAULT_DELIMITERback to summary
private static final String DEFAULT_DELIMITER
EMPTY_CHARback to summary
private static final char EMPTY_CHAR
MAX_FIELDSback to summary
private static final int MAX_FIELDS
MAX_RECORD_SIZEback to summary
private static final int MAX_RECORD_SIZE
SKIP_EMPTY_LINESback to summary
private static final boolean SKIP_EMPTY_LINES
TRIM_WHITESPACES_AROUND_QUOTESback to summary
private static final boolean TRIM_WHITESPACES_AROUND_QUOTES

Constructor Detail

CsvReaderFactoryback to summary
private CsvReaderFactory()

Method Detail

createCallbackHandlerback to summary
private static CsvCallbackHandler<? extends CsvRecord> createCallbackHandler(String emptyValue, Set<String> nullValues, boolean ignoreLeadingAndTrailingWhitespaces, int maxCharsPerColumn, boolean useHeadersInDisplayName)
createReaderForback to summary
pack-priv static CsvReader<? extends CsvRecord> createReaderFor(CsvSource csvSource, String data)
createReaderForback to summary
pack-priv static CsvReader<? extends CsvRecord> createReaderFor(CsvFileSource csvFileSource, InputStream inputStream, Charset charset)
selectDelimiterback to summary
private static String selectDelimiter(char delimiter, String delimiterString)
stringValuesUniqueback to summary
private static boolean stringValuesUnique(Object... values)
validateback to summary
pack-priv static void validate(CsvSource csvSource)
validateback to summary
pack-priv static void validate(CsvFileSource csvFileSource)
validateControlCharactersDifferback to summary
private static void validateControlCharactersDiffer(String delimiter, char quoteCharacter, char commentCharacter, CommentStrategy commentStrategy)
validateDelimiterback to summary
private static void validateDelimiter(char delimiter, String delimiterString, Annotation annotation)
validateMaxCharsPerColumnback to summary
private static void validateMaxCharsPerColumn(int maxCharsPerColumn)
org.junit.jupiter.params.provider back to summary

pack-priv final Record CsvReaderFactory.DefaultFieldModifier

extends Record
implements FieldModifier
Class Inheritance
All Implemented Interfaces
de.siegmar.fastcsv.reader.FieldModifier
Record Components
emptyValue:String 
nullValues:Set<String> 
ignoreLeadingAndTrailingWhitespaces:boolean 

Field Summary

Modifier and TypeField and Description
private final String
emptyValue

Record Component accessed by emptyValue().

private final boolean
pack-priv static final String
NULL_MARKER

Represents a null value and serves as a workaround since FastCSV does not allow the modified field value to be null.

private final Set<String>
nullValues

Record Component accessed by nullValues().

Constructor Summary

AccessConstructor and Description
pack-priv
DefaultFieldModifier(String emptyValue, Set<String> nullValues, boolean ignoreLeadingAndTrailingWhitespaces)

Method Summary

Modifier and TypeMethod and Description
public String
emptyValue()

Record Component getter of emptyValue.

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public boolean
public String
modify(long unusedStartingLineNumber, int unusedFieldIdx, boolean quoted, String field)

Overrides default de.siegmar.fastcsv.reader.FieldModifier.modify.

Gets called for every single field (that is not a comment).

public Set<String>
nullValues()

Record Component getter of nullValues.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

emptyValueback to summary
private final String emptyValue

Record Component accessed by emptyValue().

ignoreLeadingAndTrailingWhitespacesback to summary
private final boolean ignoreLeadingAndTrailingWhitespaces

Record Component accessed by ignoreLeadingAndTrailingWhitespaces().

NULL_MARKERback to summary
pack-priv static final String NULL_MARKER

Represents a null value and serves as a workaround since FastCSV does not allow the modified field value to be null.

The marker is generated with a unique ID to ensure it cannot conflict with actual CSV content.

nullValuesback to summary
private final Set<String> nullValues

Record Component accessed by nullValues().

Constructor Detail

DefaultFieldModifierback to summary
pack-priv DefaultFieldModifier(String emptyValue, Set<String> nullValues, boolean ignoreLeadingAndTrailingWhitespaces)

Method Detail

emptyValueback to summary
public String emptyValue()

Record Component getter of emptyValue.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

ignoreLeadingAndTrailingWhitespacesback to summary
public boolean ignoreLeadingAndTrailingWhitespaces()

Record Component getter of ignoreLeadingAndTrailingWhitespaces.

modifyback to summary
public String modify(long unusedStartingLineNumber, int unusedFieldIdx, boolean quoted, String field)

Overrides default de.siegmar.fastcsv.reader.FieldModifier.modify.

Doc from de.siegmar.fastcsv.reader.FieldModifier.modify.

Gets called for every single field (that is not a comment). The Default implementation returns the field as is.

Annotations
@Override
nullValuesback to summary
public Set<String> nullValues()

Record Component getter of nullValues.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.