MCPcopy
hub / github.com/google/guava / compareTo

Method compareTo

guava/src/com/google/common/collect/Cut.java:71–85  ·  view source on GitHub ↗
(Cut<C> that)

Source from the content-addressed store, hash-verified

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;

Callers 15

equalsMethod · 0.95
addMethod · 0.45
removeMethod · 0.45
getMethod · 0.45
computeNextMethod · 0.45
removeMethod · 0.45
splitMethod · 0.45
spanMethod · 0.45
computeNextMethod · 0.45
getMethod · 0.45
computeNextMethod · 0.45
minMethod · 0.45

Calls 4

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

Tested by

no test coverage detected