sem2/oop/oop_exercises/src/main/java/ch/hslu/oop/sw07/PersonNameComparator.java
<reponame>Davee02/HSLUpackage ch.hslu.oop.sw07;

import java.util.Comparator;

public class PersonNameComparator implements Comparator<Person> {
    @Override
    public int compare(Person p1, Person p2) {
        return Comparator.comparing(Person::getLastname)
                .thenComparing(Person::getFirstname)
                .compare(p1, p2);
    }
}
