MCPcopy Create free account
hub / github.com/antlr/codebuff / compareTo

Method compareTo

output/java_guava/1.4.18/Cut.java:80–94  ·  view source on GitHub ↗
(Cut<C> that)

Source from the content-addressed store, hash-verified

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;

Callers 15

equalsMethod · 0.95
log2Method · 0.45
log10Method · 0.45
sqrtMethod · 0.45
sqrtFloorMethod · 0.45
addMethod · 0.45
removeMethod · 0.45
getMethod · 0.45
computeNextMethod · 0.45
removeMethod · 0.45
spanMethod · 0.45
computeNextMethod · 0.45

Calls 4

belowAllMethod · 0.95
aboveAllMethod · 0.95
compareOrThrowMethod · 0.95
compareMethod · 0.95

Tested by

no test coverage detected