Skip to content

Commit 3992019

Browse files
committed
Javadoc and format tweaks
1 parent 289ffa1 commit 3992019

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ public void remove() {
192192
* Header information based on name and position.
193193
*/
194194
private static final class Headers {
195+
195196
/**
196197
* Header column positions (0-based)
197198
*/
@@ -383,7 +384,7 @@ public static CSVParser parse(final URL url, final Charset charset, final CSVFor
383384
private final Token reusableToken = new Token();
384385

385386
/**
386-
* Customized CSV parser using the given {@link CSVFormat}
387+
* Constructs a new instance using the given {@link CSVFormat}
387388
*
388389
* <p>
389390
* If you do not read all records from the given {@code reader}, you should call {@link #close()} on the parser,
@@ -404,7 +405,7 @@ public CSVParser(final Reader reader, final CSVFormat format) throws IOException
404405
}
405406

406407
/**
407-
* Customized CSV parser using the given {@link CSVFormat}
408+
* Constructs a new instance using the given {@link CSVFormat}
408409
*
409410
* <p>
410411
* If you do not read all records from the given {@code reader}, you should call {@link #close()} on the parser,
@@ -529,15 +530,15 @@ private Headers createHeaders() throws IOException {
529530
}
530531
}
531532
if (headerNames == null) {
532-
headerNames = Collections.emptyList(); //immutable
533+
headerNames = Collections.emptyList(); // immutable
533534
} else {
534535
headerNames = Collections.unmodifiableList(headerNames);
535536
}
536537
return new Headers(hdrMap, headerNames);
537538
}
538539

539540
/**
540-
* Returns the current line number in the input stream.
541+
* Gets the current line number in the input stream.
541542
*
542543
* <p>
543544
* <strong>ATTENTION:</strong> If your CSV input has multi-line values, the returned number does not correspond to
@@ -561,7 +562,7 @@ public String getFirstEndOfLine() {
561562
}
562563

563564
/**
564-
* Returns the header comment, if any.
565+
* Gets the header comment, if any.
565566
* The header comment appears before the header record.
566567
*
567568
* @return the header comment for this stream, or null if no comment is available.
@@ -572,7 +573,7 @@ public String getHeaderComment() {
572573
}
573574

574575
/**
575-
* Returns a copy of the header map.
576+
* Gets a copy of the header map as defined in the CSVFormat's header.
576577
* <p>
577578
* The map keys are column names. The map values are 0-based indices.
578579
* </p>
@@ -593,16 +594,16 @@ public Map<String, Integer> getHeaderMap() {
593594
}
594595

595596
/**
596-
* Returns the header map.
597+
* Gets the underlying header map.
597598
*
598-
* @return the header map.
599+
* @return the underlying header map.
599600
*/
600601
Map<String, Integer> getHeaderMapRaw() {
601602
return this.headers.headerMap;
602603
}
603604

604605
/**
605-
* Returns a read-only list of header names that iterates in column order.
606+
* Gets a read-only list of header names that iterates in column order as defined in the CSVFormat's header.
606607
* <p>
607608
* Note: The list provides strings that can be used as keys in the header map.
608609
* The list will not contain null column names if they were present in the input
@@ -618,7 +619,7 @@ public List<String> getHeaderNames() {
618619
}
619620

620621
/**
621-
* Returns the current record number in the input stream.
622+
* Gets the current record number in the input stream.
622623
*
623624
* <p>
624625
* <strong>ATTENTION:</strong> If your CSV input has multi-line values, the returned number does not correspond to
@@ -648,7 +649,7 @@ public List<CSVRecord> getRecords() {
648649
}
649650

650651
/**
651-
* Returns the trailer comment, if any.
652+
* Gets the trailer comment, if any.
652653
* Trailer comments are located between the last record and EOF
653654
*
654655
* @return the trailer comment for this stream, or null if no comment is available.

0 commit comments

Comments
 (0)