Add @since annotation to javadoc

Also reworded some documentation text to read better
This commit is contained in:
Peter Hull 2022-09-07 08:58:29 +01:00
parent 0414d1e4b7
commit 82ca0355d4
1 changed files with 8 additions and 4 deletions

View File

@ -602,7 +602,7 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
return Collections.unmodifiableList(headers.headerNames); return Collections.unmodifiableList(headers.headerNames);
} }
/** /**
* Checks whether this parser has a header comment, false otherwise. * Checks whether there is a header comment.
* The header comment appears before the header record. * The header comment appears before the header record.
* Note that if the parser's format has been given an explicit header * Note that if the parser's format has been given an explicit header
* (with {@link CSVFormat.Builder#setHeader(String... )} or another overload) * (with {@link CSVFormat.Builder#setHeader(String... )} or another overload)
@ -611,35 +611,39 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
* will be associated with the first record, not the header. * will be associated with the first record, not the header.
* *
* @return true if this parser has seen a header comment, false otherwise * @return true if this parser has seen a header comment, false otherwise
* @since 1.10.0
*/ */
public boolean hasHeaderComment() { public boolean hasHeaderComment() {
return headerComment != null; return headerComment != null;
} }
/** /**
* Returns the header comment for this parser, if any. * Returns the header comment, if any.
* The header comment appears before the header record. * The header comment appears before the header record.
* *
* @return the header comment for this stream, or null if no comment is available. * @return the header comment for this stream, or null if no comment is available.
* @since 1.10.0
*/ */
public String getHeaderComment() { public String getHeaderComment() {
return headerComment; return headerComment;
} }
/** /**
* Checks whether this parser has seen a trailer comment, false otherwise. * Checks whether there is a trailer comment.
* Trailer comments are located between the last record and EOF. * Trailer comments are located between the last record and EOF.
* The trailer comments will only be available after the parser has * The trailer comments will only be available after the parser has
* finished processing this stream. * finished processing this stream.
* *
* @return true if this parser has seen a trailer comment, false otherwise * @return true if this parser has seen a trailer comment, false otherwise
* @since 1.10.0
*/ */
public boolean hasTrailerComment() { public boolean hasTrailerComment() {
return trailerComment != null; return trailerComment != null;
} }
/** /**
* Returns the trailer comment for this record, if any. * Returns the trailer comment, if any.
* Trailer comments are located between the last record and EOF * Trailer comments are located between the last record and EOF
* *
* @return the trailer comment for this stream, or null if no comment is available. * @return the trailer comment for this stream, or null if no comment is available.
* @since 1.10.0
*/ */
public String getTrailerComment() { public String getTrailerComment() {
return trailerComment; return trailerComment;