I know this is not a new question but I want to sort CSV file by Column preferred in java8.
The Data-structure of CSV is List<List<CsvEntity>
I need to sort first by one field of the CsvEntity then by other (not must) example by: firstName
then by lastName
.
class CsvEntity{
private String firstName
private String lastName
private String address
}
Following this - How to sort data in a CSV file using a particular field in Java?
What modifications do I need to make for supporting sort on multiple keys in Java8?