MCPcopy Index your code
hub / github.com/apache/groovy / compareTo

Method compareTo

src/main/java/groovy/lang/Tuple.java:153–166  ·  view source on GitHub ↗

{@inheritDoc}

(Tuple<E> other)

Source from the content-addressed store, hash-verified

151 * {@inheritDoc}
152 */
153 @Override
154 public int compareTo(Tuple<E> other) {
155 int thisSize = this.size();
156 int otherSize = other.size();
157
158 for (int i = 0, n = Math.min(thisSize, otherSize); i < n; i++) {
159 int result = compare(this.get(i), other.get(i));
160 if (result != 0) {
161 return result;
162 }
163 }
164
165 return Integer.compare(thisSize, otherSize);
166 }
167
168 @SuppressWarnings("unchecked")
169 private static <T> int compare(T t1, T t2) {

Callers 9

containsWithinBoundsMethod · 0.45
calcSizeMethod · 0.45
stepMethod · 0.45
compareMethod · 0.45
containsMethod · 0.45
compareMethod · 0.45
CacheKeyClass · 0.45
hasNextMethod · 0.45

Calls 7

sizeMethod · 0.95
compareMethod · 0.95
getMethod · 0.95
sizeMethod · 0.65
minMethod · 0.65
getMethod · 0.65
compareMethod · 0.65

Tested by

no test coverage detected