Skip to content

Commit 912d83a

Browse files
committed
Polishes
1 parent 4e5b613 commit 912d83a

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/main/java/fun/seabird/EbirdCsvParser.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222

2323
@Slf4j
2424
public abstract class EbirdCsvParser
25-
{
26-
public enum ParseMode {SINGLE_THREAD,MULTI_THREAD}
27-
25+
{
2826
public enum PreSort {NONE,DATE}
2927

3028
private static final DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("hh:mm a");
@@ -124,15 +122,13 @@ private static EbirdCsvRow parseCsvLine(CsvRecord record)
124122
*
125123
* @param csvFile The path to the CSV file to be parsed. Must not be {@code null}.
126124
* @param rowProcessor A {@link Consumer} that processes each parsed row of the CSV file. The consumer receives an instance
127-
* of {@link EbirdCsvRow}, which represents the parsed data of each row. Must not be {@code null}.
128-
* @param mode The {@link ParseMode} specifying how the CSV file should be processed. {@link ParseMode#MULTI_THREAD} enables
129-
* multi-threaded processing, while {@link ParseMode#SINGLE_THREAD} uses a single thread for processing.
125+
* of {@link EbirdCsvRow}, which represents the parsed data of each row. Must not be {@code null}.
130126
* @param preSort Specifies the pre-sorting method to be applied to the CSV data before processing. If set to
131127
* {@link PreSort#DATE}, the data will be sorted by observation date prior to processing; otherwise, the
132128
* data is processed in the order it appears in the file.
133129
* @throws IOException If an I/O error occurs while reading the CSV file.
134130
*/
135-
public static final void parseCsv(Path csvFile,Consumer<EbirdCsvRow> rowProcessor,ParseMode mode,PreSort preSort) throws IOException
131+
public static void parseCsv(Path csvFile,Consumer<EbirdCsvRow> rowProcessor,PreSort preSort) throws IOException
136132
{
137133
log.info("Parsing " + csvFile + " ...");
138134

@@ -178,9 +174,9 @@ public void accept(CsvRecord record)
178174
* @param rowProcessor The consumer function to be applied to each parsed CSV row.
179175
* @throws IOException If an I/O error occurs while reading the CSV file.
180176
*/
181-
public static final void parseCsv(Path csvFile,Consumer<EbirdCsvRow> rowProcessor) throws IOException
177+
public static void parseCsv(Path csvFile,Consumer<EbirdCsvRow> rowProcessor) throws IOException
182178
{
183-
parseCsv(csvFile,rowProcessor,ParseMode.SINGLE_THREAD,PreSort.NONE);
179+
parseCsv(csvFile,rowProcessor,PreSort.NONE);
184180
}
185181

186182
}

0 commit comments

Comments
 (0)