Package org.csvobjects.csv.mapping
Class CSVBeanMapping.Builder
java.lang.Object
org.csvobjects.csv.mapping.CSVBeanMapping.Builder
- Enclosing class:
CSVBeanMapping
Mutable builder for incrementally constructing an immutable
CSVBeanMapping while its field mappings are being parsed.-
Method Summary
Modifier and TypeMethodDescriptionaddFieldMapping(CSVFieldMapping fieldMapping) Adds a new field mapping for this bean mapping.Sets the mapped bean's fully qualified class name.Sets the mapped bean's user defined name.build()Builds the immutable bean mapping.csvHeaderPresent(boolean newCsvHeaderPresent) Sets the flag which indicates whether a header row is present in the mapped CSV file or stream.
-
Method Details
-
beanName
Sets the mapped bean's user defined name.- Parameters:
newBeanName- the mapped bean's user defined name- Returns:
- this builder
-
beanClass
Sets the mapped bean's fully qualified class name.- Parameters:
newBeanClass- the mapped bean's class name- Returns:
- this builder
-
csvHeaderPresent
Sets the flag which indicates whether a header row is present in the mapped CSV file or stream.- Parameters:
newCsvHeaderPresent- the flag value to set- Returns:
- this builder
-
addFieldMapping
Adds a new field mapping for this bean mapping.- Parameters:
fieldMapping- the field mapping to add- Returns:
- this builder
-
build
Builds the immutable bean mapping.- Returns:
- the built bean mapping
-