Lets say that I have a document that looks like this:
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class main {
    public static void main(String[] args) {
        List<Person> people = Arrays.asList(
                new Person("New York", "foo", "bar"),
                new Person("New York", "bar", "foo"),
                new Person("New Jersey", "foo", "bar"),
                new Person("New Jersey", "bar", "foo")
        );
    }
    public static class Person {
        public String city;
        public String firstName;
        public String lastName;
        Person(String city, String firstName, String lastName) {
            this.city = city;
            this.firstName = firstName;
            this.lastName = lastName;
        }
    }
}
How would I be able to use streams to only get one person from each city and return it into a list?
 
    