package emps.strumieniowo;

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

public class P6_UnikalneMiasta_Set {

	public static void main(String[] args) {
		List<Employee> emps = ObslugaCSV.wczytaj("emps.csv");
		
		Collection<String> miasta = emps.stream()
				.map(Employee::getCity)
				.collect(Collectors.toSet());
				
				// .collect(Collectors.toList());
				// .collect(Collectors.toCollection(TreeSet::new));
		
		System.out.println("Miasta: " + miasta);
		System.out.println("Typ kolekcji: " + miasta.getClass().getName());
	}

}
