@@ -1454,21 +1454,6 @@ public CSVFormat withSkipHeaderRecord(final boolean skipHeaderRecord) {
14541454 skipHeaderRecord , allowMissingColumnNames , ignoreHeaderCase , trim , trailingDelimiter );
14551455 }
14561456
1457- /**
1458- * Returns a new {@code CSVFormat} with whether to trim leading and trailing blanks.
1459- *
1460- * @param trim
1461- * whether to trim leading and trailing blanks.
1462- *
1463- * @return A new CSVFormat that is equal to this but with the specified trim setting.
1464- * @since 1.3
1465- */
1466- public CSVFormat withTrim (final boolean trim ) {
1467- return new CSVFormat (delimiter , quoteCharacter , quoteMode , commentMarker , escapeCharacter ,
1468- ignoreSurroundingSpaces , ignoreEmptyLines , recordSeparator , nullString , headerComments , header ,
1469- skipHeaderRecord , allowMissingColumnNames , ignoreHeaderCase , trim , trailingDelimiter );
1470- }
1471-
14721457 /**
14731458 * Returns a new {@code CSVFormat} to add a trailing delimiter.
14741459 *
@@ -1503,4 +1488,19 @@ public CSVFormat withTrailingDelimiter(final boolean trailingDelimiter) {
15031488 public CSVFormat withTrim () {
15041489 return withTrim (true );
15051490 }
1491+
1492+ /**
1493+ * Returns a new {@code CSVFormat} with whether to trim leading and trailing blanks.
1494+ *
1495+ * @param trim
1496+ * whether to trim leading and trailing blanks.
1497+ *
1498+ * @return A new CSVFormat that is equal to this but with the specified trim setting.
1499+ * @since 1.3
1500+ */
1501+ public CSVFormat withTrim (final boolean trim ) {
1502+ return new CSVFormat (delimiter , quoteCharacter , quoteMode , commentMarker , escapeCharacter ,
1503+ ignoreSurroundingSpaces , ignoreEmptyLines , recordSeparator , nullString , headerComments , header ,
1504+ skipHeaderRecord , allowMissingColumnNames , ignoreHeaderCase , trim , trailingDelimiter );
1505+ }
15061506}
0 commit comments