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