Skip to content

Commit c84328e

Browse files
committed
Fix JavaDoc errors
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592365 13f79535-47bb-0310-9956-ffa450edef68
1 parent 9f03b06 commit c84328e

3 files changed

Lines changed: 43 additions & 27 deletions

File tree

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
/**
3737
* Specifies the format of a CSV file and parses input.
3838
*
39-
* <h4>Using predefined formats</h4>
39+
* <h2>Using predefined formats</h2>
4040
*
4141
* <p>
4242
* You can use one of the predefined formats:
@@ -64,7 +64,7 @@
6464
*
6565
* <pre>CSVParser parser = CSVFormat.parseFile(file, CSVFormat.EXCEL);</pre>
6666
*
67-
* <h4>Defining formats</h4>
67+
* <h2>Defining formats</h2>
6868
*
6969
* <p>
7070
* You can extend a format by calling the {@code with} methods. For example:
@@ -76,7 +76,7 @@
7676
* .withIgnoreSurroundingSpaces(true);
7777
* </pre>
7878
*
79-
* <h4>Defining column names</h4>
79+
* <h2>Defining column names</h2>
8080
*
8181
* <p>
8282
* To define the column names you want to use to access records, write:
@@ -94,7 +94,7 @@
9494
* {@link #withSkipHeaderRecord(boolean)} with {@code true}.
9595
* </p>
9696
*
97-
* <h4>Parsing</h4>
97+
* <h2>Parsing</h2>
9898
*
9999
* <p>
100100
* You can use a format directly to parse a reader. For example, to parse an Excel file with columns header, write:
@@ -109,7 +109,7 @@
109109
* For other input types, like resources, files, and URLs, use the static methods on {@link CSVParser}.
110110
* </p>
111111
*
112-
* <h4>Referencing columns safely</h4>
112+
* <h2>Referencing columns safely</h2>
113113
*
114114
* <p>
115115
* If your source contains a header record, you can simplify your code and safely reference columns,
@@ -134,7 +134,7 @@
134134
* This makes your code impervious to changes in column order in the CSV file.
135135
* </p>
136136
*
137-
* <h4>Notes</h4>
137+
* <h2>Notes</h2>
138138
*
139139
* <p>
140140
* This class is immutable.
@@ -188,13 +188,18 @@ public final class CSVFormat implements Serializable {
188188
/**
189189
* Excel file format (using a comma as the value delimiter). Note that the actual value delimiter used by Excel is
190190
* locale dependent, it might be necessary to customize this format to accommodate to your regional settings.
191-
* <p/>
191+
*
192+
* <p>
192193
* For example for parsing or generating a CSV file on a French system the following format will be used:
194+
* </p>
193195
*
194196
* <pre>
195197
* CSVFormat fmt = CSVFormat.newBuilder(EXCEL).withDelimiter(';');
196198
* </pre>
199+
*
200+
* <p>
197201
* Settings are:
202+
* </p>
198203
* <ul>
199204
* <li>withDelimiter(',')</li>
200205
* <li>withQuoteChar('"')</li>

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

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@
4444
*
4545
* The parser works record wise. It is not possible to go back, once a record has been parsed from the input stream.
4646
*
47-
* <h4>Creating instances</h4>
48-
* There are several static factory methods that can be used to create instances for various types of resources:
47+
* <h2>Creating instances</h2>
4948
* <p>
49+
* There are several static factory methods that can be used to create instances for various types of resources:
50+
* </p>
5051
* <ul>
5152
* <li>{@link #parse(java.io.File, CSVFormat)}</li>
5253
* <li>{@link #parse(String, CSVFormat)}</li>
5354
* <li>{@link #parse(java.net.URL, java.nio.charset.Charset, CSVFormat)}</li>
5455
* </ul>
55-
* </p>
5656
* <p>
5757
* Alternatively parsers can also be created by passing a {@link Reader} directly to the sole constructor.
5858
*
@@ -64,7 +64,7 @@
6464
* }
6565
* </pre>
6666
*
67-
* <h4>Parsing record wise</h4>
67+
* <h2>Parsing record wise</h2>
6868
* <p>
6969
* To parse a CSV input from a file, you write:
7070
* </p>
@@ -98,7 +98,7 @@
9898
* customising CSVFormats is available in {@link CSVFormat CSVFormat JavaDoc}.
9999
* </p>
100100
*
101-
* <h4>Parsing into memory</h4>
101+
* <h2>Parsing into memory</h2>
102102
* <p>
103103
* If parsing record wise is not desired, the contents of the input can be read completely into memory.
104104
* </p>
@@ -113,16 +113,14 @@
113113
* There are two constraints that have to be kept in mind:
114114
* </p>
115115
*
116-
* <p>
117116
* <ol>
118117
* <li>Parsing into memory starts at the current position of the parser. If you have already parsed records from
119118
* the input, those records will not end up in the in memory representation of your CSV data.</li>
120119
* <li>Parsing into memory may consume a lot of system resources depending on the input. For example if you're
121120
* parsing a 150MB file of CSV data the contents will be read completely into memory.</li>
122121
* </ol>
123-
* </p>
124122
*
125-
* <h4>Notes</h4>
123+
* <h2>Notes</h2>
126124
* <p>
127125
* Internal parser state is completely covered by the format and the reader-state.
128126
* </p>
@@ -268,8 +266,10 @@ public void close() throws IOException {
268266

269267
/**
270268
* Returns the current line number in the input stream.
271-
* <p/>
272-
* ATTENTION: If your CSV input has multi-line values, the returned number does not correspond to the record number.
269+
*
270+
* <p>
271+
* <strong>ATTENTION:</strong> If your CSV input has multi-line values, the returned number does not correspond to the record number.
272+
* </p>
273273
*
274274
* @return current line number
275275
*/
@@ -290,8 +290,10 @@ public Map<String, Integer> getHeaderMap() {
290290

291291
/**
292292
* Returns the current record number in the input stream.
293-
* <p/>
294-
* ATTENTION: If your CSV input has multi-line values, the returned number does not correspond to the line number.
293+
*
294+
* <p>
295+
* <strong>ATTENTION:</strong> If your CSV input has multi-line values, the returned number does not correspond to the line number.
296+
* </p>
295297
*
296298
* @return current line number
297299
*/
@@ -302,8 +304,10 @@ public long getRecordNumber() {
302304
/**
303305
* Parses the CSV input according to the given format and returns the content as a list of
304306
* {@link CSVRecord CSVRecords}.
305-
* <p/>
307+
*
308+
* <p>
306309
* The returned content starts at the current parse-position in the stream.
310+
* </p>
307311
*
308312
* @return list of {@link CSVRecord CSVRecords}, may be empty
309313
* @throws IOException
@@ -316,11 +320,14 @@ public List<CSVRecord> getRecords() throws IOException {
316320
/**
317321
* Parses the CSV input according to the given format and adds the content to the collection of {@link CSVRecord
318322
* CSVRecords}.
319-
* <p/>
323+
*
324+
* <p>
320325
* The returned content starts at the current parse-position in the stream.
321-
*
326+
* </p>
327+
*
322328
* @param records
323329
* The collection to add to.
330+
* @param <T> the type of collection used.
324331
* @return a collection of {@link CSVRecord CSVRecords}, may be empty
325332
* @throws IOException
326333
* on parse error or input read-failure

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ public final class CSVPrinter implements Flushable, Closeable {
4444

4545
/**
4646
* Creates a printer that will print values to the given stream following the CSVFormat.
47-
* <p/>
47+
* <p>
4848
* Currently, only a pure encapsulation format or a pure escaping format is supported. Hybrid formats
4949
* (encapsulation and escaping with a different character) are not supported.
50+
* </p>
5051
*
5152
* @param out
5253
* stream to which to print. Must not be null.
@@ -275,10 +276,13 @@ private void printAndQuote(final Object object, final CharSequence value,
275276
}
276277

277278
/**
278-
* Prints a comment on a new line among the delimiter separated values. Comments will always begin on a new line
279-
* and occupy a least one full line. The character specified to start comments and a space will be inserted at the
280-
* beginning of each new line in the comment.
281-
* <p/>
279+
* Prints a comment on a new line among the delimiter separated values.
280+
*
281+
* <p>
282+
* Comments will always begin on a new line and occupy a least one full line. The character specified to start
283+
* comments and a space will be inserted at the beginning of each new line in the comment.
284+
* </p>
285+
*
282286
* If comments are disabled in the current CSV format this method does nothing.
283287
*
284288
* @param comment

0 commit comments

Comments
 (0)