1 package civitas.result;
2
3 import org.springframework.stereotype.Controller;
4
5 @Controller
6 public class CompareBeats {
7 Integer apply(final CandidatePair b1, final CandidatePair b2) {
8 if (b1.car() > b2.car()) {
9 return 1;
10 }
11 if (b1.car() < b2.car()) {
12 return -1;
13 }
14 if (b1.cdr() < b2.cdr()) {
15 return 1;
16 }
17 if (b1.cdr() > b2.cdr()) {
18 return -1;
19 }
20 return 0;
21 }
22 }