Skip to content

Commit 0685c84

Browse files
committed
Format nits.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1739673 13f79535-47bb-0310-9956-ffa450edef68
1 parent a4c1a85 commit 0685c84

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ public CSVFormat getFormat() {
241241
* @see Predefined#Excel
242242
*/
243243
public static final CSVFormat EXCEL = DEFAULT.withIgnoreEmptyLines(false).withAllowMissingColumnNames();
244+
244245
/**
245246
* Default MySQL format used by the {@code SELECT INTO OUTFILE} and {@code LOAD DATA INFILE} operations.
246247
*
@@ -267,6 +268,7 @@ public CSVFormat getFormat() {
267268
*/
268269
public static final CSVFormat MYSQL = DEFAULT.withDelimiter(TAB).withEscape(BACKSLASH).withIgnoreEmptyLines(false)
269270
.withQuote(null).withRecordSeparator(LF).withNullString("\\N");
271+
270272
/**
271273
* Comma separated format as defined by <a href="http://tools.ietf.org/html/rfc4180">RFC 4180</a>.
272274
*
@@ -282,7 +284,9 @@ public CSVFormat getFormat() {
282284
* @see Predefined#RFC4180
283285
*/
284286
public static final CSVFormat RFC4180 = DEFAULT.withIgnoreEmptyLines(false);
287+
285288
private static final long serialVersionUID = 1L;
289+
286290
/**
287291
* Tab-delimited format.
288292
*
@@ -298,6 +302,7 @@ public CSVFormat getFormat() {
298302
* @see Predefined#TDF
299303
*/
300304
public static final CSVFormat TDF = DEFAULT.withDelimiter(TAB).withIgnoreSurroundingSpaces();
305+
301306
/**
302307
* Returns true if the given character is a line break character.
303308
*
@@ -309,6 +314,7 @@ public CSVFormat getFormat() {
309314
private static boolean isLineBreak(final char c) {
310315
return c == LF || c == CR;
311316
}
317+
312318
/**
313319
* Returns true if the given character is a line break character.
314320
*
@@ -320,6 +326,7 @@ private static boolean isLineBreak(final char c) {
320326
private static boolean isLineBreak(final Character c) {
321327
return c != null && isLineBreak(c.charValue());
322328
}
329+
323330
/**
324331
* Creates a new CSV format with the specified delimiter.
325332
*
@@ -343,6 +350,7 @@ private static boolean isLineBreak(final Character c) {
343350
public static CSVFormat newFormat(final char delimiter) {
344351
return new CSVFormat(delimiter, null, null, null, null, false, false, null, null, null, null, false, false, false);
345352
}
353+
346354
/**
347355
* Gets one of the predefined formats from {@link CSVFormat.Predefined}.
348356
*
@@ -354,10 +362,15 @@ public static CSVFormat newFormat(final char delimiter) {
354362
public static CSVFormat valueOf(final String format) {
355363
return CSVFormat.Predefined.valueOf(format).getFormat();
356364
}
365+
357366
private final boolean allowMissingColumnNames;
367+
358368
private final Character commentMarker; // null if commenting is disabled
369+
359370
private final char delimiter;
371+
360372
private final Character escapeCharacter; // null if escaping is disabled
373+
361374
private final String[] header; // array of header column names
362375

363376
private final String[] headerComments; // array of header comment lines

0 commit comments

Comments
 (0)