@@ -44,8 +44,8 @@ public class CSVFormat implements Serializable {
4444 private final char encapsulator ;
4545 private final char commentStart ;
4646 private final char escape ;
47- private final boolean surroundingSpacesIgnored ; // Should leading/trailing spaces be ignored around values?
48- private final boolean emptyLinesIgnored ;
47+ private final boolean ignoreSurroundingSpaces ; // Should leading/trailing spaces be ignored around values?
48+ private final boolean ignoreEmptyLines ;
4949 private final String lineSeparator ; // for outputs
5050 private final String [] header ;
5151
@@ -78,7 +78,7 @@ public class CSVFormat implements Serializable {
7878 PRISTINE .
7979 withDelimiter (COMMA )
8080 .withEncapsulator (DOUBLE_QUOTE )
81- .withEmptyLinesIgnored (true )
81+ .withIgnoreEmptyLines (true )
8282 .withLineSeparator (CRLF );
8383
8484 /**
@@ -117,8 +117,8 @@ public class CSVFormat implements Serializable {
117117 PRISTINE
118118 .withDelimiter (TAB )
119119 .withEncapsulator (DOUBLE_QUOTE )
120- .withSurroundingSpacesIgnored (true )
121- .withEmptyLinesIgnored (true )
120+ .withIgnoreSurroundingSpaces (true )
121+ .withIgnoreEmptyLines (true )
122122 .withLineSeparator (CRLF );
123123
124124 /**
@@ -146,9 +146,9 @@ public class CSVFormat implements Serializable {
146146 * the char used for comment identification
147147 * @param escape
148148 * the char used to escape special characters in values
149- * @param surroundingSpacesIgnored
149+ * @param ignoreSurroundingSpaces
150150 * <tt>true</tt> when whitespaces enclosing values should be ignored
151- * @param emptyLinesIgnored
151+ * @param ignoreEmptyLines
152152 * <tt>true</tt> when the parser should skip empty lines
153153 * @param lineSeparator
154154 * the line separator to use for output
@@ -161,8 +161,8 @@ public class CSVFormat implements Serializable {
161161 this .encapsulator = encapsulator ;
162162 this .commentStart = commentStart ;
163163 this .escape = escape ;
164- this .surroundingSpacesIgnored = surroundingSpacesIgnored ;
165- this .emptyLinesIgnored = emptyLinesIgnored ;
164+ this .ignoreSurroundingSpaces = surroundingSpacesIgnored ;
165+ this .ignoreEmptyLines = emptyLinesIgnored ;
166166 this .lineSeparator = lineSeparator ;
167167 this .header = header ;
168168 this .isEncapsulating = encapsulator != DISABLED ;
@@ -234,8 +234,8 @@ public CSVFormat withDelimiter(char delimiter) {
234234 if (isLineBreak (delimiter )) {
235235 throw new IllegalArgumentException ("The delimiter cannot be a line break" );
236236 }
237- return new CSVFormat (delimiter , encapsulator , commentStart , escape , surroundingSpacesIgnored ,
238- emptyLinesIgnored , lineSeparator , header );
237+ return new CSVFormat (delimiter , encapsulator , commentStart , escape , ignoreSurroundingSpaces ,
238+ ignoreEmptyLines , lineSeparator , header );
239239 }
240240
241241 /**
@@ -260,8 +260,8 @@ public CSVFormat withEncapsulator(char encapsulator) {
260260 if (isLineBreak (encapsulator )) {
261261 throw new IllegalArgumentException ("The encapsulator cannot be a line break" );
262262 }
263- return new CSVFormat (delimiter , encapsulator , commentStart , escape , surroundingSpacesIgnored ,
264- emptyLinesIgnored , lineSeparator , header );
263+ return new CSVFormat (delimiter , encapsulator , commentStart , escape , ignoreSurroundingSpaces ,
264+ ignoreEmptyLines , lineSeparator , header );
265265 }
266266
267267 /**
@@ -297,8 +297,8 @@ public CSVFormat withCommentStart(char commentStart) {
297297 if (isLineBreak (commentStart )) {
298298 throw new IllegalArgumentException ("The comment start character cannot be a line break" );
299299 }
300- return new CSVFormat (delimiter , encapsulator , commentStart , escape , surroundingSpacesIgnored ,
301- emptyLinesIgnored , lineSeparator , header );
300+ return new CSVFormat (delimiter , encapsulator , commentStart , escape , ignoreSurroundingSpaces ,
301+ ignoreEmptyLines , lineSeparator , header );
302302 }
303303
304304 /**
@@ -334,8 +334,8 @@ public CSVFormat withEscape(char escape) {
334334 if (isLineBreak (escape )) {
335335 throw new IllegalArgumentException ("The escape character cannot be a line break" );
336336 }
337- return new CSVFormat (delimiter , encapsulator , commentStart , escape , surroundingSpacesIgnored ,
338- emptyLinesIgnored , lineSeparator , header );
337+ return new CSVFormat (delimiter , encapsulator , commentStart , escape , ignoreSurroundingSpaces ,
338+ ignoreEmptyLines , lineSeparator , header );
339339 }
340340
341341 /**
@@ -353,21 +353,21 @@ public boolean isEscaping() {
353353 * @return <tt>true</tt> if spaces around values are ignored, <tt>false</tt> if they are treated as part of the
354354 * value.
355355 */
356- public boolean isSurroundingSpacesIgnored () {
357- return surroundingSpacesIgnored ;
356+ public boolean getIgnoreSurroundingSpaces () {
357+ return ignoreSurroundingSpaces ;
358358 }
359359
360360 /**
361361 * Returns a copy of this format with the specified trimming behavior.
362362 *
363- * @param surroundingSpacesIgnored
363+ * @param ignoreSurroundingSpaces
364364 * the trimming behavior, <tt>true</tt> to remove the surrounding spaces, <tt>false</tt> to leave the
365365 * spaces as is.
366366 * @return A copy of this format with the specified trimming behavior.
367367 */
368- public CSVFormat withSurroundingSpacesIgnored (boolean surroundingSpacesIgnored ) {
369- return new CSVFormat (delimiter , encapsulator , commentStart , escape , surroundingSpacesIgnored ,
370- emptyLinesIgnored , lineSeparator , header );
368+ public CSVFormat withIgnoreSurroundingSpaces (boolean ignoreSurroundingSpaces ) {
369+ return new CSVFormat (delimiter , encapsulator , commentStart , escape , ignoreSurroundingSpaces ,
370+ ignoreEmptyLines , lineSeparator , header );
371371 }
372372
373373 /**
@@ -376,21 +376,21 @@ public CSVFormat withSurroundingSpacesIgnored(boolean surroundingSpacesIgnored)
376376 * @return <tt>true</tt> if empty lines between records are ignored, <tt>false</tt> if they are turned into empty
377377 * records.
378378 */
379- public boolean isEmptyLinesIgnored () {
380- return emptyLinesIgnored ;
379+ public boolean getIgnoreEmptyLines () {
380+ return ignoreEmptyLines ;
381381 }
382382
383383 /**
384384 * Returns a copy of this format with the specified empty line skipping behavior.
385385 *
386- * @param emptyLinesIgnored
386+ * @param ignoreEmptyLines
387387 * the empty line skipping behavior, <tt>true</tt> to ignore the empty lines between the records,
388388 * <tt>false</tt> to translate empty lines to empty records.
389389 * @return A copy of this format with the specified empty line skipping behavior.
390390 */
391- public CSVFormat withEmptyLinesIgnored (boolean emptyLinesIgnored ) {
392- return new CSVFormat (delimiter , encapsulator , commentStart , escape , surroundingSpacesIgnored ,
393- emptyLinesIgnored , lineSeparator , header );
391+ public CSVFormat withIgnoreEmptyLines (boolean ignoreEmptyLines ) {
392+ return new CSVFormat (delimiter , encapsulator , commentStart , escape , ignoreSurroundingSpaces ,
393+ ignoreEmptyLines , lineSeparator , header );
394394 }
395395
396396 /**
@@ -411,8 +411,8 @@ public String getLineSeparator() {
411411 * @return A copy of this format using the specified output line separator
412412 */
413413 public CSVFormat withLineSeparator (String lineSeparator ) {
414- return new CSVFormat (delimiter , encapsulator , commentStart , escape , surroundingSpacesIgnored ,
415- emptyLinesIgnored , lineSeparator , header );
414+ return new CSVFormat (delimiter , encapsulator , commentStart , escape , ignoreSurroundingSpaces ,
415+ ignoreEmptyLines , lineSeparator , header );
416416 }
417417
418418 String [] getHeader () {
@@ -439,8 +439,8 @@ String[] getHeader() {
439439 * @return A copy of this format using the specified header
440440 */
441441 public CSVFormat withHeader (String ... header ) {
442- return new CSVFormat (delimiter , encapsulator , commentStart , escape , surroundingSpacesIgnored ,
443- emptyLinesIgnored , lineSeparator , header );
442+ return new CSVFormat (delimiter , encapsulator , commentStart , escape , ignoreSurroundingSpaces ,
443+ ignoreEmptyLines , lineSeparator , header );
444444 }
445445
446446 /**
@@ -486,10 +486,10 @@ public String toString() {
486486 sb .append (' ' );
487487 sb .append ("CommentStart=<" ).append (commentStart ).append ('>' );
488488 }
489- if (isEmptyLinesIgnored ()) {
489+ if (getIgnoreEmptyLines ()) {
490490 sb .append (" EmptyLines:ignored" );
491491 }
492- if (isSurroundingSpacesIgnored ()) {
492+ if (getIgnoreSurroundingSpaces ()) {
493493 sb .append (" SurroundingSpaces:ignored" );
494494 }
495495 return sb .toString ();
0 commit comments