(Cut<C> that)
| 78 | // note: overriden by {BELOW,ABOVE}_ALL |
| 79 | |
| 80 | @Override |
| 81 | public int compareTo(Cut<C> that) { |
| 82 | if (that == belowAll()) { |
| 83 | return 1; |
| 84 | } |
| 85 | if (that == aboveAll()) { |
| 86 | return -1; |
| 87 | } |
| 88 | int result = Range.compareOrThrow(endpoint, that.endpoint); |
| 89 | if (result != 0) { |
| 90 | return result; |
| 91 | } |
| 92 | // same value. below comes before above |
| 93 | return Booleans.compare(this instanceof AboveValue, that instanceof AboveValue); |
| 94 | } |
| 95 | |
| 96 | C endpoint() { |
| 97 | return endpoint; |