Javadoc and format tweaks

This commit is contained in:
Gary Gregory 2022-10-22 08:52:41 -04:00
parent 289ffa1627
commit 3992019933
1 changed files with 12 additions and 11 deletions

View File

@ -192,6 +192,7 @@ public final class CSVParser implements Iterable<CSVRecord>, 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<CSVRecord>, Closeable {
private final Token reusableToken = new Token();
/**
* Customized CSV parser using the given {@link CSVFormat}
* Constructs a new instance using the given {@link CSVFormat}
*
* <p>
* 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<CSVRecord>, Closeable {
}
/**
* Customized CSV parser using the given {@link CSVFormat}
* Constructs a new instance using the given {@link CSVFormat}
*
* <p>
* 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<CSVRecord>, 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<CSVRecord>, Closeable {
}
/**
* Returns the current line number in the input stream.
* Gets the current line number in the input stream.
*
* <p>
* <strong>ATTENTION:</strong> 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<CSVRecord>, 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<CSVRecord>, Closeable {
}
/**
* Returns a copy of the header map.
* Gets a copy of the header map as defined in the CSVFormat's header.
* <p>
* The map keys are column names. The map values are 0-based indices.
* </p>
@ -593,16 +594,16 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
}
/**
* Returns the header map.
* Gets the underlying header map.
*
* @return the header map.
* @return the underlying header map.
*/
Map<String, Integer> 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.
* <p>
* 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<CSVRecord>, Closeable {
}
/**
* Returns the current record number in the input stream.
* Gets the current record number in the input stream.
*
* <p>
* <strong>ATTENTION:</strong> 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<CSVRecord>, 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.