Skip to content
This repository was archived by the owner on Jun 3, 2026. It is now read-only.

Commit 8376025

Browse files
authored
Javadoc
1 parent 00738ef commit 8376025

1 file changed

Lines changed: 30 additions & 30 deletions

File tree

src/main/java/org/apache/commons/csv/CSVFormat.java

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ public Builder setEscape(final Character escapeCharacter) {
477477
* The header is also used by the {@link CSVPrinter}.
478478
* </p>
479479
*
480-
* @param headerEnum the enum defining the header, {@code null} if disabled, empty if parsed automatically, user specified otherwise.
480+
* @param headerEnum the enum defining the header, {@code null} if disabled, empty if parsed automatically, user-specified otherwise.
481481
* @return This instance.
482482
*/
483483
public Builder setHeader(final Class<? extends Enum<?>> headerEnum) {
@@ -491,7 +491,7 @@ public Builder setHeader(final Class<? extends Enum<?>> headerEnum) {
491491
}
492492

493493
/**
494-
* Sets the header from the result set metadata. The header can either be parsed automatically from the input file with:
494+
* Sets the header from the result set metadata. The header can be parsed automatically from the input file with:
495495
*
496496
* <pre>
497497
* builder.setHeader();
@@ -506,7 +506,7 @@ public Builder setHeader(final Class<? extends Enum<?>> headerEnum) {
506506
* The header is also used by the {@link CSVPrinter}.
507507
* </p>
508508
*
509-
* @param resultSet the resultSet for the header, {@code null} if disabled, empty if parsed automatically, user specified otherwise.
509+
* @param resultSet the resultSet for the header, {@code null} if disabled, empty if parsed automatically, user-specified otherwise.
510510
* @return This instance.
511511
* @throws SQLException SQLException if a database access error occurs or this method is called on a closed result set.
512512
*/
@@ -515,7 +515,7 @@ public Builder setHeader(final ResultSet resultSet) throws SQLException {
515515
}
516516

517517
/**
518-
* Sets the header from the result set metadata. The header can either be parsed automatically from the input file with:
518+
* Sets the header from the result set metadata. The header can be parsed automatically from the input file with:
519519
*
520520
* <pre>
521521
* builder.setHeader();
@@ -530,7 +530,7 @@ public Builder setHeader(final ResultSet resultSet) throws SQLException {
530530
* The header is also used by the {@link CSVPrinter}.
531531
* </p>
532532
*
533-
* @param resultSetMetaData the metaData for the header, {@code null} if disabled, empty if parsed automatically, user specified otherwise.
533+
* @param resultSetMetaData the metaData for the header, {@code null} if disabled, empty if parsed automatically, user-specified otherwise.
534534
* @return This instance.
535535
* @throws SQLException SQLException if a database access error occurs or this method is called on a closed result set.
536536
*/
@@ -547,7 +547,7 @@ public Builder setHeader(final ResultSetMetaData resultSetMetaData) throws SQLEx
547547
}
548548

549549
/**
550-
* Sets the header to the given values. The header can either be parsed automatically from the input file with:
550+
* Sets the header to the given values. The header can be parsed automatically from the input file with:
551551
*
552552
* <pre>
553553
* builder.setHeader();
@@ -562,7 +562,7 @@ public Builder setHeader(final ResultSetMetaData resultSetMetaData) throws SQLEx
562562
* The header is also used by the {@link CSVPrinter}.
563563
* </p>
564564
*
565-
* @param header the header, {@code null} if disabled, empty if parsed automatically, user specified otherwise.
565+
* @param header the header, {@code null} if disabled, empty if parsed automatically, user-specified otherwise.
566566
* @return This instance.
567567
*/
568568
public Builder setHeader(final String... header) {
@@ -909,8 +909,8 @@ public CSVFormat getFormat() {
909909
false, false, false, DuplicateHeaderMode.ALLOW_ALL);
910910

911911
/**
912-
* Excel file format (using a comma as the value delimiter). Note that the actual value delimiter used by Excel is locale dependent, it might be necessary
913-
* to customize this format to accommodate to your regional settings.
912+
* Excel file format (using a comma as the value delimiter). Note that the actual value delimiter used by Excel is locale-dependent, it might be necessary
913+
* to customize this format to accommodate your regional settings.
914914
*
915915
* <p>
916916
* For example for parsing or generating a CSV file on a French system the following format will be used:
@@ -949,7 +949,7 @@ public CSVFormat getFormat() {
949949
* Default Informix CSV UNLOAD format used by the {@code UNLOAD TO file_name} operation.
950950
*
951951
* <p>
952-
* This is a comma-delimited format with a LF character as the line separator. Values are not quoted and special characters are escaped with {@code '\'}.
952+
* This is a comma-delimited format with an LF character as the line separator. Values are not quoted and special characters are escaped with {@code '\'}.
953953
* The default NULL string is {@code "\\N"}.
954954
* </p>
955955
*
@@ -981,7 +981,7 @@ public CSVFormat getFormat() {
981981
* Default Informix CSV UNLOAD format used by the {@code UNLOAD TO file_name} operation (escaping is disabled.)
982982
*
983983
* <p>
984-
* This is a comma-delimited format with a LF character as the line separator. Values are not quoted and special characters are escaped with {@code '\'}.
984+
* This is a comma-delimited format with an LF character as the line separator. Values are not quoted and special characters are escaped with {@code '\'}.
985985
* The default NULL string is {@code "\\N"}.
986986
* </p>
987987
*
@@ -1084,7 +1084,7 @@ public CSVFormat getFormat() {
10841084
* Default MySQL format used by the {@code SELECT INTO OUTFILE} and {@code LOAD DATA INFILE} operations.
10851085
*
10861086
* <p>
1087-
* This is a tab-delimited format with a LF character as the line separator. Values are not quoted and special
1087+
* This is a tab-delimited format with an LF character as the line separator. Values are not quoted and special
10881088
* characters are escaped with {@code '\'}. The default NULL string is {@code "\\N"}.
10891089
* </p>
10901090
*
@@ -1121,7 +1121,7 @@ public CSVFormat getFormat() {
11211121
* Default Oracle format used by the SQL*Loader utility.
11221122
*
11231123
* <p>
1124-
* This is a comma-delimited format with the system line separator character as the record separator.Values are
1124+
* This is a comma-delimited format with the system line separator character as the record separator. Values are
11251125
* double quoted when needed and special characters are escaped with {@code '"'}. The default NULL string is
11261126
* {@code ""}. Values are trimmed.
11271127
* </p>
@@ -1161,7 +1161,7 @@ public CSVFormat getFormat() {
11611161
* Default PostgreSQL CSV format used by the {@code COPY} operation.
11621162
*
11631163
* <p>
1164-
* This is a comma-delimited format with a LF character as the line separator. Values are double quoted and special
1164+
* This is a comma-delimited format with an LF character as the line separator. Values are double quoted and special
11651165
* characters are not escaped. The default NULL string is {@code ""}.
11661166
* </p>
11671167
*
@@ -1199,7 +1199,7 @@ public CSVFormat getFormat() {
11991199
* Default PostgreSQL text format used by the {@code COPY} operation.
12001200
*
12011201
* <p>
1202-
* This is a tab-delimited format with a LF character as the line separator. Values are not quoted and special
1202+
* This is a tab-delimited format with an LF character as the line separator. Values are not quoted and special
12031203
* characters are escaped with {@code '\\'}. The default NULL string is {@code "\\N"}.
12041204
* </p>
12051205
*
@@ -1890,7 +1890,7 @@ private boolean isDelimiter(final char ch, final CharSequence charSeq, final int
18901890
}
18911891

18921892
/**
1893-
* Tests whether escape are being processed.
1893+
* Tests whether escapes are being processed.
18941894
*
18951895
* @return {@code true} if escapes are processed
18961896
*/
@@ -1899,7 +1899,7 @@ public boolean isEscapeCharacterSet() {
18991899
}
19001900

19011901
/**
1902-
* Tests whether a nullString has been defined.
1902+
* Tests whether a null string has been defined.
19031903
*
19041904
* @return {@code true} if a nullString is defined
19051905
*/
@@ -2009,7 +2009,7 @@ private synchronized void print(final Object object, final CharSequence value, f
20092009
if (object == null) {
20102010
out.append(value);
20112011
} else if (isQuoteCharacterSet()) {
2012-
// the original object is needed so can check for Number
2012+
// The original object is needed so can check for Number
20132013
printWithQuotes(object, value, out, newRecord);
20142014
} else if (isEscapeCharacterSet()) {
20152015
printWithEscapes(value, out);
@@ -2086,7 +2086,7 @@ public synchronized void println(final Appendable appendable) throws IOException
20862086
}
20872087

20882088
/**
2089-
* Prints the given {@code values} to {@code out} as a single record of delimiter separated values followed by the record separator.
2089+
* Prints the given {@code values} to {@code out} as a single record of delimiter-separated values followed by the record separator.
20902090
*
20912091
* <p>
20922092
* The values will be quoted if needed. Quotes and new-line characters will be escaped. This method adds the record separator to the output after printing
@@ -2241,7 +2241,7 @@ private void printWithQuotes(final Object object, final CharSequence charSeq, fi
22412241
return;
22422242
case MINIMAL:
22432243
if (len <= 0) {
2244-
// always quote an empty token that is the first
2244+
// Always quote an empty token that is the first
22452245
// on the line, as it may be the only thing on the
22462246
// line. If it were not quoted in that case,
22472247
// an empty line has no tokens.
@@ -2279,7 +2279,7 @@ private void printWithQuotes(final Object object, final CharSequence charSeq, fi
22792279
}
22802280

22812281
if (!quote) {
2282-
// no encapsulation needed - write out the original value
2282+
// No encapsulation needed - write out the original value
22832283
out.append(charSeq, start, len);
22842284
return;
22852285
}
@@ -2289,12 +2289,12 @@ private void printWithQuotes(final Object object, final CharSequence charSeq, fi
22892289
}
22902290

22912291
if (!quote) {
2292-
// no encapsulation needed - write out the original value
2292+
// No encapsulation needed - write out the original value
22932293
out.append(charSeq, start, len);
22942294
return;
22952295
}
22962296

2297-
// we hit something that needed encapsulation
2297+
// We hit something that needed encapsulation
22982298
out.append(quoteChar);
22992299

23002300
// Pick up where we left off: pos should be positioned on the first character that caused
@@ -2310,13 +2310,13 @@ private void printWithQuotes(final Object object, final CharSequence charSeq, fi
23102310
pos++;
23112311
}
23122312

2313-
// write the last segment
2313+
// Write the last segment
23142314
out.append(charSeq, start, pos);
23152315
out.append(quoteChar);
23162316
}
23172317

23182318
/**
2319-
* Always use quotes unless QuoteMode is NONE, so we not have to look ahead.
2319+
* Always use quotes unless QuoteMode is NONE, so we do not have to look ahead.
23202320
*
23212321
* @param reader What to print
23222322
* @param appendable Where to print it
@@ -2417,7 +2417,7 @@ String trim(final String value) {
24172417
/**
24182418
* Verifies the validity and consistency of the attributes, and throws an {@link IllegalArgumentException} if necessary.
24192419
* <p>
2420-
* Because an instance can be used for both writing an parsing, not all conditions can be tested here. For example allowMissingColumnNames is only used for
2420+
* Because an instance can be used for both writing and parsing, not all conditions can be tested here. For example, allowMissingColumnNames is only used for
24212421
* parsing, so it cannot be used here.
24222422
* </p>
24232423
*
@@ -2570,7 +2570,7 @@ public CSVFormat withCommentMarker(final Character commentMarker) {
25702570
* Builds a new {@code CSVFormat} with the delimiter of the format set to the specified character.
25712571
*
25722572
* @param delimiter the delimiter character
2573-
* @return A new CSVFormat that is equal to this with the specified character as delimiter
2573+
* @return A new CSVFormat that is equal to this with the specified character as a delimiter
25742574
* @throws IllegalArgumentException thrown if the specified character is a line break
25752575
* @deprecated Use {@link Builder#setDelimiter(char)}
25762576
*/
@@ -2679,7 +2679,7 @@ public CSVFormat withHeader(final Class<? extends Enum<?>> headerEnum) {
26792679
* The header is also used by the {@link CSVPrinter}.
26802680
* </p>
26812681
*
2682-
* @param resultSet the resultSet for the header, {@code null} if disabled, empty if parsed automatically, user specified otherwise.
2682+
* @param resultSet the resultSet for the header, {@code null} if disabled, empty if parsed automatically, user-specified otherwise.
26832683
* @return A new CSVFormat that is equal to this but with the specified header
26842684
* @throws SQLException SQLException if a database access error occurs or this method is called on a closed result set.
26852685
* @since 1.1
@@ -2735,7 +2735,7 @@ public CSVFormat withHeader(final ResultSetMetaData resultSetMetaData) throws SQ
27352735
* The header is also used by the {@link CSVPrinter}.
27362736
* </p>
27372737
*
2738-
* @param header the header, {@code null} if disabled, empty if parsed automatically, user specified otherwise.
2738+
* @param header the header, {@code null} if disabled, empty if parsed automatically, user-specified otherwise.
27392739
* @return A new CSVFormat that is equal to this but with the specified header
27402740
* @see Builder#setSkipHeaderRecord(boolean)
27412741
* @deprecated Use {@link Builder#setHeader(String...)}
@@ -2793,7 +2793,7 @@ public CSVFormat withIgnoreEmptyLines(final boolean ignoreEmptyLines) {
27932793
/**
27942794
* Builds a new {@code CSVFormat} with the header ignore case behavior set to {@code true}.
27952795
*
2796-
* @return A new CSVFormat that will ignore case header name.
2796+
* @return A new CSVFormat that will ignore the new case header name behavior.
27972797
* @see Builder#setIgnoreHeaderCase(boolean)
27982798
* @since 1.3
27992799
* @deprecated Use {@link Builder#setIgnoreHeaderCase(boolean) Builder#setIgnoreHeaderCase(true)}

0 commit comments

Comments
 (0)