-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.java
31 lines (24 loc) · 788 Bytes
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import java.util.List;
import com.sahurjt.objectcsv.CsvDelimiter;
import com.sahurjt.objectcsv.CsvHolder;
import com.sahurjt.objectcsv.ObjectCsv;
import com.sahurjt.objectcsv.ObjectCsvException;
public class Main {
private static final String FILE_PATH_1 = ".\\matches.csv";
public static void main(String[] args) {
try {
test();
} catch (Exception e) {
e.printStackTrace();
}
}
private static void test() throws ObjectCsvException {
CsvHolder<SampleMatchModel> holder = ObjectCsv.getInstance().from(FILE_PATH_1).with(CsvDelimiter.COMMA)
.getCsvHolderforClass(SampleMatchModel.class);
List<SampleMatchModel> models = holder.getCsvRecords();
System.out.println(holder.getContent());
for (SampleMatchModel m : models) {
System.out.println(m);
}
}
}