(Cut<C> that)
| 69 | |
| 70 | // note: overridden by {BELOW,ABOVE}_ALL |
| 71 | @Override |
| 72 | public int compareTo(Cut<C> that) { |
| 73 | if (that == belowAll()) { |
| 74 | return 1; |
| 75 | } |
| 76 | if (that == aboveAll()) { |
| 77 | return -1; |
| 78 | } |
| 79 | int result = Range.compareOrThrow(endpoint, that.endpoint); |
| 80 | if (result != 0) { |
| 81 | return result; |
| 82 | } |
| 83 | // same value. below comes before above |
| 84 | return Boolean.compare(this instanceof AboveValue, that instanceof AboveValue); |
| 85 | } |
| 86 | |
| 87 | C endpoint() { |
| 88 | return endpoint; |
no test coverage detected