(Tuple o1, Tuple o2)
| 115 | } |
| 116 | |
| 117 | public int compare(Tuple o1, Tuple o2) { |
| 118 | Field t1 = (o1).getField(field); |
| 119 | Field t2 = (o2).getField(field); |
| 120 | if (t1.compare(Predicate.Op.EQUALS, t2)) |
| 121 | return 0; |
| 122 | if (t1.compare(Predicate.Op.GREATER_THAN, t2)) |
| 123 | return asc ? 1 : -1; |
| 124 | else |
| 125 | return asc ? -1 : 1; |
| 126 | } |
| 127 | |
| 128 | } |