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

Method compare

src/main/java/groovy/lang/Tuple.java:168–181  ·  view source on GitHub ↗
(T t1, T t2)

Source from the content-addressed store, hash-verified

166 }
167
168 @SuppressWarnings("unchecked")
169 private static <T> int compare(T t1, T t2) {
170 return t1 == null && t2 == null
171 ? 0
172 : t1 == null
173 ? 1
174 : t2 == null
175 ? -1
176 : t1 instanceof Comparable
177 ? ((Comparable<T>) t1).compareTo(t2)
178 : DefaultTypeTransformation.compareEqual(t1, t2)
179 ? 0
180 : 1;
181 }
182
183 /**
184 * Construct a tuple of degree 0.

Callers 1

compareToMethod · 0.95

Calls 2

compareEqualMethod · 0.95
compareToMethod · 0.45

Tested by

no test coverage detected