Top Description Fields Constructors Methods
com.opencsv.bean

public Class HeaderColumnNameTranslateMappingStrategyBuilder<T>

extends AbstractMappingStrategyBuilder<T, HeaderColumnNameTranslateMappingStrategy<T>>
Class Inheritance
Type Parameters
<T>
The type of the bean being processed

Builder for a HeaderColumnNameMappingStrategy. This allows opencsv to introduce new options for mapping strategies while maintaining backward compatibility and without creating reams of constructors for the mapping strategy.
Author
Andrew Rucker Jones
Since
5.5

Field Summary

Modifier and TypeField and Description
private boolean
Inherited from com.opencsv.bean.AbstractMappingStrategyBuilder:
type

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public HeaderColumnNameTranslateMappingStrategy<T>
build()

Implements abstract com.opencsv.bean.AbstractMappingStrategyBuilder.build.

Builds a new mapping strategy for parsing/writing.

public HeaderColumnNameTranslateMappingStrategyBuilder<T>

Returns:

this
withForceCorrectRecordLength
(boolean
Whether records should be forced to the correct length
forceCorrectRecordLength
)

Insists that every record will be considered to be of the correct length (that is, the same number of columns as the header).

Inherited from com.opencsv.bean.AbstractMappingStrategyBuilder:
withType

Field Detail

forceCorrectRecordLengthback to summary
private boolean forceCorrectRecordLength

Constructor Detail

HeaderColumnNameTranslateMappingStrategyBuilderback to summary
public HeaderColumnNameTranslateMappingStrategyBuilder()

Default constructor.

Method Detail

buildback to summary
public HeaderColumnNameTranslateMappingStrategy<T> build()

Implements abstract com.opencsv.bean.AbstractMappingStrategyBuilder.build.

Doc from com.opencsv.bean.AbstractMappingStrategyBuilder.build.

Builds a new mapping strategy for parsing/writing.

Annotations
@Override
withForceCorrectRecordLengthback to summary
public HeaderColumnNameTranslateMappingStrategyBuilder<T> withForceCorrectRecordLength(boolean forceCorrectRecordLength)

Insists that every record will be considered to be of the correct length (that is, the same number of columns as the header).

Excess fields at the end of a record will be ignored. Missing fields at the end of a record will be interpreted as null. This is only relevant on reading.

If not set, incorrect record length will throw an exception. That is, the default value is false.

Parameters
forceCorrectRecordLength:boolean

Whether records should be forced to the correct length

Returns:HeaderColumnNameTranslateMappingStrategyBuilder<T>

this