public class StudentChoiceOrder extends Object implements StudentOrder, Comparator<Student>
Constructor and Description |
---|
StudentChoiceOrder(DataProperties config) |
Modifier and Type | Method and Description |
---|---|
double |
avgNrChoices(Student student)
Average number of choices for each student
|
int |
compare(Student s1,
Student s2) |
boolean |
isReverse()
Is order reversed
|
List<Student> |
order(List<Student> students)
Order the given list of students
|
void |
setReverse(boolean reverse)
Set reverse order
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals
public StudentChoiceOrder(DataProperties config)
public boolean isReverse()
public void setReverse(boolean reverse)
reverse
- true if students are to be in a reversed orderpublic 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 double avgNrChoices(Student student)
student
- given studentCopyright © 2016 UniTime LLC. All Rights Reserved.