public interface CsvBuilder
Modifier and Type | Method and Description |
---|---|
CsvEscapeMode |
getCsvEscapeMode()
Retrieves the CSV escape mode from the CSV escape mode property.
|
char |
getDelimiterChar()
Retrieves the delimiter char from the delimiter char property.
|
Collection<Object> |
getFields()
Retrieves the CSV elements from the CSV elements property.
|
String |
getRecord()
Retrieves the CSV line from the CSV line property.
|
void |
setCsvEscapeMode(CsvEscapeMode aCsvEscapeMode)
Sets the CSV escape mode for the CSV escape mode property.
|
void |
setDelimiterChar(char aDelimiterChar)
Sets the delimiter char for the delimiter char property.
|
default void |
setFields(boolean... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(Boolean... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(byte... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(Byte... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(char... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(Character... aFields)
Sets the CSV elements for the CSV elements property.
|
void |
setFields(Collection<Object> aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(double... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(Double... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(float... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(Float... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(int... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(Integer... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(long... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(Long... aFields)
Sets the CSV elements for the CSV elements property.
|
void |
setFields(Object... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(short... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(Short... aFields)
Sets the CSV elements for the CSV elements property.
|
default void |
setFields(String... aFields)
Sets the CSV elements for the CSV elements property.
|
void |
setRecord(String aRecord)
Sets the CSV line for the CSV line property.
|
List<String> |
toFields()
Creates a list of
String elements from the CSV line being set via
setRecord(String) or withRecord(String) . |
default String[] |
toFields(String aRecord)
To fields.
|
String |
toRecord()
Creates a CSV line from the elements being set via
setFields(String[]) or withFields(String[]) . |
default String |
toRecord(boolean... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(Boolean... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(byte... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(Byte... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(char... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(Character... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
String |
toRecord(Collection<Object> aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(double... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(Double... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(float... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(Float... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(int... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(Integer... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(long... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(Long... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
String |
toRecord(Object... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(short... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
default String |
toRecord(Short... aFields)
To record.
|
default String |
toRecord(String... aFields)
Creates a CSV line from the fields being provided
This method is to be side effect free in terms of the fields (and the
resulting record) is not part of the state for this instance (from the
point of view of this method).
|
String |
toString()
The
String being build by the builder upon the settings of the
attributes. |
String[] |
toStrings()
Creates an array of
String s from the CSV line being set via
setRecord(String) or withRecord(String) . |
String[] |
toStrings(String aRecord)
Creates an array of
String s from the CSV line being set via
setRecord(String) or withRecord(String) . |
default CsvBuilder |
withCsvEscapeMode(CsvEscapeMode aCsvEscapeMode)
Sets the CSV escape mode for the CSV escape mode property.
|
default CsvBuilder |
withDelimiterChar(char aDelimiterChar)
Sets the delimiter char for the delimiter char property.
|
default CsvBuilder |
withFields(boolean... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(Boolean... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(byte... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(Byte... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(char... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(Character... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(Collection<Object> aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(double... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(Double... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(float... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(Float... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(int... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(Integer... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(long... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(Long... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(Object... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(short... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(Short... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withFields(String... aFields)
Sets the CSV elements for the CSV elements property.
|
default CsvBuilder |
withRecord(String aRecord)
Sets the CSV line for the CSV line property.
|
CsvEscapeMode getCsvEscapeMode()
void setCsvEscapeMode(CsvEscapeMode aCsvEscapeMode)
aCsvEscapeMode
- The CSV escape mode to be stored by the align text
mode property.default CsvBuilder withCsvEscapeMode(CsvEscapeMode aCsvEscapeMode)
aCsvEscapeMode
- The CSV escape mode to be stored by the align text
mode property.char getDelimiterChar()
void setDelimiterChar(char aDelimiterChar)
aDelimiterChar
- The delimiter char to be stored by the text align
mode property.default CsvBuilder withDelimiterChar(char aDelimiterChar)
aDelimiterChar
- The delimiter char to be stored by the text align
mode property.String getRecord()
void setRecord(String aRecord)
aRecord
- The CSV line to be stored by the CSV line property.default CsvBuilder withRecord(String aRecord)
aRecord
- The CSV line to be stored by the CSV line property.void setFields(Object... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(boolean... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(byte... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(short... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(int... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(long... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(float... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(double... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(char... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(boolean... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(byte... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(short... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(int... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(long... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(float... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(double... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(char... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(Boolean... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(Byte... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(Short... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(Integer... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(Long... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(Float... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(Double... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(Character... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default void setFields(String... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(Object... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(Boolean... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(Byte... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(Short... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(Integer... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(Long... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(Float... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(Double... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(Character... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(String... aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.Collection<Object> getFields()
void setFields(Collection<Object> aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.default CsvBuilder withFields(Collection<Object> aFields)
aFields
- The CSV elements to be stored by the CSV elements
property.List<String> toFields() throws IllegalStateException
String
elements from the CSV line being set via
setRecord(String)
or withRecord(String)
.IllegalStateException
- Thrown in case no elements have been set
via the withFields(String[])
or
setFields(String[])
methods.String toRecord() throws IllegalStateException
setFields(String[])
or withFields(String[])
.IllegalStateException
- Thrown in case no CSV line has been set via
the withRecord(String)
or setRecord(String)
methods.default String toRecord(boolean... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(byte... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(short... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(int... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(long... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(float... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(double... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(char... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.String toRecord(Object... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.String toRecord(Collection<Object> aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(Boolean... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(Byte... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(Short... aFields)
aFields
- the a fieldsdefault String toRecord(Integer... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(Long... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(Float... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(Double... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(Character... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.default String toRecord(String... aFields)
withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the fields
(and the resulting record), use this method instead of the combination of
withFields(String...)
with toRecord()
.aFields
- The CSV elements to be converted into a record.String[] toStrings()
String
s from the CSV line being set via
setRecord(String)
or withRecord(String)
. It should
return the same result as an array as a call to toFields()
.default String[] toFields(String aRecord)
aRecord
- the a recordtoStrings(String)
String[] toStrings(String aRecord)
String
s from the CSV line being set via
setRecord(String)
or withRecord(String)
. It should
return the same result as an array as a call to toFields()
.
This method is to be side effect free in terms of the record (and the
resulting fields) is not part of the state for this instance (from the
point of view of this method). Still changing for example the delimiter
via withDelimiterChar(char)
can cause side effects!
For avoiding thread race conditions / side effects regarding the record
(and the resulting fields), use this method instead of the combination of
withRecord(String)
with toStrings()
.aRecord
- The CSV line to be stored by the CSV line property.Copyright © 2017. All rights reserved.