package emps;

import java.util.List;
import java.util.stream.Collectors;

public class F5_MinMax_Liczby {
    public static void main(String[] args) {
        List<Employee> emps = ObslugaCSV.wczytaj();

        int min = emps.stream()
                .mapToInt(Employee::getSalary)
                .min()
                .orElse(0);

        int max = emps.stream()
                .mapToInt(Employee::getSalary)
                .max()
                .orElse(0);

        System.out.println("Minimalna pensja: " + min);
        System.out.println("Maksymalna pensja: " + max);
    }
}
