package emps;

import java.util.Comparator;
import java.util.List;

public class F6_Sortowanie {

    public static void main(String[] args) {
        List<Employee> emps = ObslugaCSV.wczytaj();
        emps.stream()
                .sorted(Comparator.comparingInt(Employee::getSalary).reversed())
                .map(emp -> String.format("%s %s (%s) zarabia %d",
                        emp.getFirstName(), emp.getLastName(), emp.getJobTitle(), emp.getSalary()))
                .forEach(System.out::println);
    }
}
