public class StudentMajorOrder extends Object implements StudentOrder, Comparator<Student>
Constructor and Description |
---|
StudentMajorOrder(DataProperties config) |
Modifier and Type | Method and Description |
---|---|
int |
compare(Student s1,
Student s2) |
int |
compareMajors(AreaClassificationMajor m1,
AreaClassificationMajor m2) |
int |
compareMajors(List<AreaClassificationMajor> m1,
List<AreaClassificationMajor> m2) |
List<Student> |
order(List<Student> students)
Order the given list of students
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public StudentMajorOrder(DataProperties config)
public List<Student> order(List<Student> students)
order
in interface StudentOrder
students
- input list of studentspublic int compare(Student s1, Student s2)
compare
in interface Comparator<Student>
public int compareMajors(List<AreaClassificationMajor> m1, List<AreaClassificationMajor> m2)
public int compareMajors(AreaClassificationMajor m1, AreaClassificationMajor m2)