Skip to content

Commit bc64fb5

Browse files
committed
CSV-243 CSVFormat withTrim() and withIgnoreSurroundingSpaces()
need better docs
1 parent 8b6cfb2 commit bc64fb5

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,8 @@ public boolean getTrailingDelimiter() {
10671067

10681068
/**
10691069
* Returns whether to trim leading and trailing blanks.
1070+
* This is used by {@link #print(Object, Appendable, boolean)}
1071+
* Also by {@link CSVParser#addRecordValue(boolean)}
10701072
*
10711073
* @return whether to trim leading and trailing blanks.
10721074
*/
@@ -1197,7 +1199,7 @@ public CSVPrinter print(final File out, final Charset charset) throws IOExceptio
11971199
/**
11981200
* Prints the {@code value} as the next value on the line to {@code out}. The value will be escaped or encapsulated
11991201
* as needed. Useful when one wants to avoid creating CSVPrinters.
1200-
*
1202+
* Trims the value if {@link #getTrim()} is true
12011203
* @param value
12021204
* value to output.
12031205
* @param out
@@ -2294,7 +2296,8 @@ public CSVFormat withTrailingDelimiter(final boolean trailingDelimiter) {
22942296
}
22952297

22962298
/**
2297-
* Returns a new {@code CSVFormat} to trim leading and trailing blanks when printing.
2299+
* Returns a new {@code CSVFormat} to trim leading and trailing blanks.
2300+
* See {@link #getTrim()} for details of where this is used.
22982301
*
22992302
* @return A new CSVFormat that is equal to this but with the trim setting on.
23002303
* @since 1.3
@@ -2304,10 +2307,11 @@ public CSVFormat withTrim() {
23042307
}
23052308

23062309
/**
2307-
* Returns a new {@code CSVFormat} with whether to trim leading and trailing blanks when printing.
2310+
* Returns a new {@code CSVFormat} with whether to trim leading and trailing blanks.
2311+
* See {@link #getTrim()} for details of where this is used.
23082312
*
23092313
* @param trim
2310-
* whether to trim leading and trailing blanks when printing.
2314+
* whether to trim leading and trailing blanks.
23112315
*
23122316
* @return A new CSVFormat that is equal to this but with the specified trim setting.
23132317
* @since 1.3

0 commit comments

Comments
 (0)