@@ -123,15 +123,18 @@ private static EbirdCsvRow parseCsvLine(CSVRecord record)
123123 }
124124
125125 /**
126- * Parses a CSV file and applies the given row processor to each CSV record.
127- * The parsing can be performed in single-threaded or multi-threaded mode,
128- * based on the provided ParseMode. Optionally, the CSV records can be pre-sorted
129- * based on the specified PreSort before processing.
126+ * Parses a CSV file containing eBird observation data and processes each row according to the specified {@code rowProcessor}.
127+ * The method allows for pre-sorting of data based on the observation date and supports processing in either single-threaded
128+ * or multi-threaded mode as specified by the {@code mode} parameter.
130129 *
131- * @param csvFile The path to the CSV file to be parsed.
132- * @param rowProcessor The consumer function to be applied to each parsed CSV row.
133- * @param mode The parsing mode: SINGLE_THREAD or MULTI_THREAD.
134- * @param preSort The pre-sorting option for the CSV records: null, PreSort.DATE, or PreSort.DEFAULT_SORT.
130+ * @param csvFile The path to the CSV file to be parsed. Must not be {@code null}.
131+ * @param rowProcessor A {@link Consumer} that processes each parsed row of the CSV file. The consumer receives an instance
132+ * of {@link EbirdCsvRow}, which represents the parsed data of each row. Must not be {@code null}.
133+ * @param mode The {@link ParseMode} specifying how the CSV file should be processed. {@link ParseMode#MULTI_THREAD} enables
134+ * multi-threaded processing, while {@link ParseMode#SINGLE_THREAD} uses a single thread for processing.
135+ * @param preSort Specifies the pre-sorting method to be applied to the CSV data before processing. If set to
136+ * {@link PreSort#DATE}, the data will be sorted by observation date prior to processing; otherwise, the
137+ * data is processed in the order it appears in the file.
135138 * @throws IOException If an I/O error occurs while reading the CSV file.
136139 */
137140 public static final void parseCsv (Path csvFile ,Consumer <EbirdCsvRow > rowProcessor ,ParseMode mode ,PreSort preSort ) throws IOException
0 commit comments