feat(sorting): add comparator for student group
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package sorting;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
public class StudentGroupComparator implements Comparator<Student> {
|
||||
|
||||
@Override
|
||||
public int compare(Student s1, Student s2) {
|
||||
return Integer.compare(s1.getGroupNumber(), s2.getGroupNumber());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user