package emps.v3_funkcyjnie;

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

public class P7_Sortowanie {

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

}
