Package org.refcodes.textual
Interface CsvBuilder
-
- All Superinterfaces:
CsvEscapeModeAccessor
,CsvEscapeModeAccessor.CsvEscapeModeBuilder<CsvMixin>
,CsvEscapeModeAccessor.CsvEscapeModeMutator
,CsvEscapeModeAccessor.CsvEscapeModeProperty
,CsvMixin
,org.refcodes.mixin.DelimiterAccessor
,org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<CsvMixin>
,org.refcodes.mixin.DelimiterAccessor.DelimiterMutator
,org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
,org.refcodes.mixin.TrimAccessor
,org.refcodes.mixin.TrimAccessor.TrimBuilder<CsvMixin>
,org.refcodes.mixin.TrimAccessor.TrimMutator
,org.refcodes.mixin.TrimAccessor.TrimProperty
- All Known Implementing Classes:
CsvBuilderImpl
public interface CsvBuilder extends CsvMixin
The Interface CsvBuilder.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.textual.CsvEscapeModeAccessor
CsvEscapeModeAccessor.CsvEscapeModeBuilder<B extends CsvEscapeModeAccessor.CsvEscapeModeBuilder<?>>, CsvEscapeModeAccessor.CsvEscapeModeMutator, CsvEscapeModeAccessor.CsvEscapeModeProperty
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.DelimiterAccessor
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static CsvBuilder
build()
This is a convenience method for easily instantiating the according builder.Collection<Object>
getFields()
Retrieves the CSV elements from the CSV elements property.String
getRecord()
Retrieves the CSV line from the CSV line 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(char... 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(int... 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(short... 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(Character... 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(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.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(String... aFields)
Sets the CSV elements for the CSV elements property.void
setFields(Collection<Object> 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 ofString
elements from the CSV line being set viasetRecord(String)
orwithRecord(String)
.default String[]
toFields(String aRecord)
Creates an array ofString
s from the CSV line being set viasetRecord(String)
orwithRecord(String)
.String
toRecord()
Creates a CSV line from the elements being set viasetFields(String[])
orwithFields(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(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(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(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(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(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(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(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).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(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).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)
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
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).String
toString()
TheString
being build by the builder upon the settings of the attributes.default String
toString(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
toString(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).default String
toString(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).String[]
toStrings()
Creates an array ofString
s from the CSV line being set viasetRecord(String)
orwithRecord(String)
.String[]
toStrings(String aRecord)
Convenience method for thetoFields(String)
method.default CsvBuilder
withCommentPrefixes(String... aCommentPrefixes)
Sets the prefixes used to identify CSV lines to be ignored.default CsvBuilder
withCsvEscapeMode(CsvEscapeMode aCsvEscapeMode)
Sets the rowsCsvEscapeMode
to use returns this builder as of the Builder-Pattern.default CsvBuilder
withDelimiter(char aDelimiterChar)
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(char... 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(int... 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(short... 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(Character... 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(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(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(String... 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
withRecord(String aRecord)
Sets the CSV line for the CSV line property.default CsvBuilder
withTrim(boolean isTrimRecords)
-
Methods inherited from interface org.refcodes.textual.CsvEscapeModeAccessor
getCsvEscapeMode
-
Methods inherited from interface org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeMutator
setCsvEscapeMode
-
Methods inherited from interface org.refcodes.textual.CsvMixin
clearCommentPrefixes, getCommentPrefixes, isComment, setCommentPrefixes, toComment, uncomment
-
-
-
-
Method Detail
-
withTrim
default CsvBuilder withTrim(boolean isTrimRecords)
- Specified by:
withTrim
in interfaceorg.refcodes.mixin.TrimAccessor.TrimBuilder<CsvMixin>
-
withCsvEscapeMode
default CsvBuilder withCsvEscapeMode(CsvEscapeMode aCsvEscapeMode)
Sets the rowsCsvEscapeMode
to use returns this builder as of the Builder-Pattern.- Specified by:
withCsvEscapeMode
in interfaceCsvEscapeModeAccessor.CsvEscapeModeBuilder<CsvMixin>
- Parameters:
aCsvEscapeMode
- TheCsvEscapeMode
to be used when printing a row or the header.- Returns:
- This
CsvEscapeModeAccessor.CsvEscapeModeBuilder
instance to continue configuration.
-
withDelimiter
default CsvBuilder withDelimiter(char aDelimiterChar)
- Specified by:
withDelimiter
in interfaceorg.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<CsvMixin>
-
withCommentPrefixes
default CsvBuilder withCommentPrefixes(String... aCommentPrefixes)
Sets the prefixes used to identify CSV lines to be ignored.- Specified by:
withCommentPrefixes
in interfaceCsvMixin
- Parameters:
aCommentPrefixes
- The prefixes used to identify CSV lines to be ignored.- Returns:
- The instance on which this method has been invoked as of the builder pattern.
-
getRecord
String getRecord()
Retrieves the CSV line from the CSV line property.- Returns:
- The CSV line stored by the CSV line property.
-
setRecord
void setRecord(String aRecord)
Sets the CSV line for the CSV line property.- Parameters:
aRecord
- The CSV line to be stored by the CSV line property.
-
withRecord
default CsvBuilder withRecord(String aRecord)
Sets the CSV line for the CSV line property.- Parameters:
aRecord
- The CSV line to be stored by the CSV line property.- Returns:
- The builder for applying multiple build operations.
-
setFields
void setFields(Object... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(boolean... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(byte... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(short... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(int... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(long... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(float... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(double... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(char... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
withFields
default CsvBuilder withFields(boolean... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(byte... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(short... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(int... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(long... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(float... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(double... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(char... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
setFields
default void setFields(Boolean... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(Byte... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(Short... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(Integer... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(Long... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(Float... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(Double... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(Character... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
setFields
default void setFields(String... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
withFields
default CsvBuilder withFields(Object... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(Boolean... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(Byte... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(Short... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(Integer... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(Long... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(Float... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(Double... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(Character... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withFields
default CsvBuilder withFields(String... aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
getFields
Collection<Object> getFields()
Retrieves the CSV elements from the CSV elements property.- Returns:
- The CSV elements stored by the CSV elements property.
-
setFields
void setFields(Collection<Object> aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.
-
withFields
default CsvBuilder withFields(Collection<Object> aFields)
Sets the CSV elements for the CSV elements property.- Parameters:
aFields
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
toFields
List<String> toFields() throws IllegalStateException
Creates a list ofString
elements from the CSV line being set viasetRecord(String)
orwithRecord(String)
.- Returns:
- The elements created from the CSV line.
- Throws:
IllegalStateException
- Thrown in case no elements have been set via thewithFields(String[])
orsetFields(String[])
methods.
-
toRecord
String toRecord() throws IllegalStateException
Creates a CSV line from the elements being set viasetFields(String[])
orwithFields(String[])
.- Returns:
- The CSV line created from the CSV line.
- Throws:
IllegalStateException
- Thrown in case no CSV line has been set via thewithRecord(String)
orsetRecord(String)
methods.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toString
default String toString(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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
default String toRecord(Short... aFields)
To record.- Parameters:
aFields
- the fields- Returns:
- the string
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toRecord
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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toString
default String toString(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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toString
default String toString(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). Still changing for example the delimiter viawithDelimiter(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 ofwithFields(String...)
withtoRecord()
.- Parameters:
aFields
- The CSV elements to be converted into a record.- Returns:
- The CSV line created from the fields.
-
toStrings
String[] toStrings()
Creates an array ofString
s from the CSV line being set viasetRecord(String)
orwithRecord(String)
. It should return the same result as an array as a call totoFields()
. Returns null if the record is a comment as ofCsvMixin.isComment(String)
.- Returns:
- The elements created from the CSV line or null if the record is a comment.
-
toFields
default String[] toFields(String aRecord)
Creates an array ofString
s from the CSV line being set viasetRecord(String)
orwithRecord(String)
. It should return the same result as an array as a call totoFields()
. Returns null if the record is a comment as ofCsvMixin.isComment(String)
. 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 viawithDelimiter(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 ofwithRecord(String)
withtoStrings()
.- Parameters:
aRecord
- The CSV line to be stored by the CSV line property.- Returns:
- The elements created from the CSV line or null if the record is a comment.
-
toStrings
String[] toStrings(String aRecord)
Convenience method for thetoFields(String)
method.- Parameters:
aRecord
- The CSV line to be stored by the CSV line property.- Returns:
- The elements created from the CSV line or null if the record is a comment.
-
toString
String toString()
TheString
being build by the builder upon the settings of the attributes. It should return the same result as a call totoRecord()
.
-
build
static CsvBuilder build()
This is a convenience method for easily instantiating the according builder.- Returns:
- an instance (using a default implementation) of this builder
-
-