From 3992019933dd26d8f7584b71ea246acbaadee3a5 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sat, 22 Oct 2022 08:52:41 -0400 Subject: [PATCH] Javadoc and format tweaks --- .../org/apache/commons/csv/CSVParser.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/apache/commons/csv/CSVParser.java b/src/main/java/org/apache/commons/csv/CSVParser.java index a8076d4a..74fade45 100644 --- a/src/main/java/org/apache/commons/csv/CSVParser.java +++ b/src/main/java/org/apache/commons/csv/CSVParser.java @@ -192,6 +192,7 @@ public final class CSVParser implements Iterable, Closeable { * Header information based on name and position. */ private static final class Headers { + /** * Header column positions (0-based) */ @@ -383,7 +384,7 @@ public final class CSVParser implements Iterable, Closeable { private final Token reusableToken = new Token(); /** - * Customized CSV parser using the given {@link CSVFormat} + * Constructs a new instance using the given {@link CSVFormat} * *

* 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 final class CSVParser implements Iterable, Closeable { } /** - * Customized CSV parser using the given {@link CSVFormat} + * Constructs a new instance using the given {@link CSVFormat} * *

* If you do not read all records from the given {@code reader}, you should call {@link #close()} on the parser, @@ -529,7 +530,7 @@ public final class CSVParser implements Iterable, Closeable { } } if (headerNames == null) { - headerNames = Collections.emptyList(); //immutable + headerNames = Collections.emptyList(); // immutable } else { headerNames = Collections.unmodifiableList(headerNames); } @@ -537,7 +538,7 @@ public final class CSVParser implements Iterable, Closeable { } /** - * Returns the current line number in the input stream. + * Gets the current line number in the input stream. * *

* ATTENTION: If your CSV input has multi-line values, the returned number does not correspond to @@ -561,7 +562,7 @@ public final class CSVParser implements Iterable, Closeable { } /** - * Returns the header comment, if any. + * Gets the header comment, if any. * The header comment appears before the header record. * * @return the header comment for this stream, or null if no comment is available. @@ -572,7 +573,7 @@ public final class CSVParser implements Iterable, Closeable { } /** - * Returns a copy of the header map. + * Gets a copy of the header map as defined in the CSVFormat's header. *

* The map keys are column names. The map values are 0-based indices. *

@@ -593,16 +594,16 @@ public final class CSVParser implements Iterable, Closeable { } /** - * Returns the header map. + * Gets the underlying header map. * - * @return the header map. + * @return the underlying header map. */ Map getHeaderMapRaw() { return this.headers.headerMap; } /** - * Returns a read-only list of header names that iterates in column order. + * Gets a read-only list of header names that iterates in column order as defined in the CSVFormat's header. *

* Note: The list provides strings that can be used as keys in the header map. * The list will not contain null column names if they were present in the input @@ -618,7 +619,7 @@ public final class CSVParser implements Iterable, Closeable { } /** - * Returns the current record number in the input stream. + * Gets the current record number in the input stream. * *

* ATTENTION: If your CSV input has multi-line values, the returned number does not correspond to @@ -648,7 +649,7 @@ public final class CSVParser implements Iterable, Closeable { } /** - * Returns the trailer comment, if any. + * Gets the trailer comment, if any. * Trailer comments are located between the last record and EOF * * @return the trailer comment for this stream, or null if no comment is available.